# Review and rating pages include Review or AggregateRating schema

- **Pattern:** `ab-002488` (`seo-advanced.structured-data.review-schema`)
- **Severity:** medium
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-002488
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-002488)

## Why it matters

Visible star ratings on product or review pages with no Review or AggregateRating schema are invisible to search engines. Google can display star ratings in SERPs only when structured data provides the numeric signal — the visual stars in your HTML mean nothing without it. schema-org AggregateRating and Review are among the highest-CTR Rich Result types; their absence is a direct revenue impact for e-commerce and service pages where purchase intent is highest. This is a frequent AI-generated gap: a review component is built, the visual stars ship, and the schema never follows.

## Severity rationale

Medium because missing review schema suppresses star Rich Results in SERPs, reducing CTR on high-intent pages, but does not break site functionality or expose user data.

## Remediation

Add AggregateRating or Review schema to every page that displays star ratings or reviews. In `app/products/[slug]/page.tsx`, derive the schema from the same computed aggregate your UI uses:

```tsx
const schema = {
  '@context': 'https://schema.org',
  '@type': 'Product',
  name: product.name,
  aggregateRating: {
    '@type': 'AggregateRating',
    ratingValue: product.avgRating.toFixed(1),
    reviewCount: product.reviewCount,
    bestRating: '5',
    worstRating: '1',
  },
}
```

For individual reviews, use `Review` with `author`, `reviewRating`, and `reviewBody` — all three are required for Rich Results eligibility. Validate on the Google Rich Results Test.

## Detection

- **ID:** `review-schema`
- **Severity:** `medium`
- **What to look for:** Count all pages that display visible reviews, star ratings, or numeric ratings. For each page, check for Review or AggregateRating schema. Enumerate the required properties: `author`, `ratingValue` (numeric), `bestRating`, and `reviewBody` (for Review) or `ratingCount` and `ratingValue` (for AggregateRating).
- **Pass criteria:** At least 90% of pages displaying visible reviews or ratings include Review or AggregateRating schema with at least 3 required properties present (`author`, `ratingValue`, and `reviewBody` for Review; or `ratingValue`, `ratingCount`, and `bestRating` for AggregateRating). Report: "X of Y review pages have complete schema."
- **Fail criteria:** Fewer than 90% of review pages have schema, or schema is missing more than 1 required property.
- **Skip (N/A) when:** The project has no user reviews or ratings displayed on any page.
- **Detail on fail:** `"2 of 5 product pages with star ratings lack AggregateRating schema"` or `"Review schema missing 'author' property on 3 pages"`.
- **Remediation:** Review and rating schemas enable star ratings in search results. Add to product page components in `app/products/[slug]/page.tsx`:

  ```json
  {
    "@context": "https://schema.org",
    "@type": "Review",
    "author": {
      "@type": "Person",
      "name": "Jane Reviewer"
    },
    "reviewRating": {
      "@type": "Rating",
      "ratingValue": "5",
      "bestRating": "5",
      "worstRating": "1"
    },
    "reviewBody": "Great product, highly recommend!",
    "itemReviewed": {
      "@type": "Product",
      "name": "Product Name"
    }
  }
  ```

## External references

- schema-org Review
- schema-org AggregateRating

Taxons: findability

HTML version: https://auditbuffet.com/patterns/ab-002488
