4.8 stars, 0 reviews: the invented metrics in your portfolio
On the project page of a portfolio site, these two sat next to each other:
4.8 ★
Not enough ratings
The score came from a default in the database schema:
rating Float @default(5.0)
reviewCount Int @default(0)
downloadCount String? @default("1K+")
Seed data compounded it — rating: 4.8, reviewCount: 42 and similar. The seed data reached production, the pages read the rating column directly, and every project on the site launched carrying a score nobody had given it.
Why this is worse than having no reviews
A young company without references is unremarkable; a visitor reads it as "recently founded". An invented metric says something else. And it is easy to catch: 4.8 stars beside zero reviews puts every other claim on the page in question. Trust that has been lost costs more to rebuild than trust never established.
The rule: a number appears with its evidence
The fix is not deleting the rating but changing the condition for showing it:
export function resolveProjectRating(reviews, externalRating, externalCount) {
const fromReviews = ratingFromReviews(reviews);
if (fromReviews) return fromReviews;
// A store listing carries both figures, so both are required.
if (externalRating && externalCount && externalCount > 0) {
return { average: externalRating, count: externalCount };
}
return null;
}
The important part is that last line: null. With no data the component renders nothing at all. No placeholder, no "no ratings yet" — the section simply is not there.
And a score with no count behind it is refused. "4.8" alone is the exact shape invented social proof takes; "4.6 from 128 ratings" is a claim someone can check.
Schema defaults quietly author content
The real lesson is about the schema. A column declaring @default("1K+") places a claim on every row nobody has touched. The day some code reads it, a number appears on your site that no person ever entered.
Content fields should default to empty. The difference between "unknown" and "1K+" is small to a database and total to a reader.
The same family of bug: a flag nothing enforces
The same audit turned up a second one. Projects had an isVisible field, it appeared as a switch in the admin panel, and not one public query filtered on it. Seven projects marked hidden — two of them belonging to clients — were listed publicly. The sitemap was submitting them to search engines.
A flag existing does not mean it is enforced. If you add a visibility field to a schema, go through every query that should read it — listing, detail page, metadata, sitemap, feeds — one at a time.