Structured Data Validator (structured-data-validator)
Summary
JSON-LD and rich-results-oriented structured data validation.
Classification
- Category:
SEO - Plugin id:
structured-data-validator - Version:
1.0.0 - Target types:
WEBSITE,WEBSHOP - Weight class:
LIGHT - Risk level: not set on plugin object
- Browser required: No (HTTP / Node / other — see source)
- Tier / group: Tier 1 — HTTP-only
Schedule
- scheduleHints:
{ defaultInterval: '0 */6 * * *', priority: 5 } - Prerequisites: None declared on this plugin.
Configurable inputs
Public keys are derived from inputSchema: z.object({ ... }) (underscore-prefixed keys are runtime-only and omitted here).
| Field | Notes |
|---|---|
timeout |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
Runtime / injected config
- None documented beyond standard worker context (
target,config,logger,reportProgress). Underscore-prefixed keys are internal.
Checks that produce findings
These checks run inside this plugin during a single test run. They are not separate tests in the database — each becomes a Finding linked to the Run for structured-data-validator.
| Check | Typical severity | Why |
|---|---|---|
| No structured data found | WARNING | No JSON-LD blocks and no [itemscope] microdata — no rich-result eligibility. |
| Invalid JSON-LD block(s) | WARNING | Unparseable <script type="application/ld+json"> — Google ignores the entire block. |
Missing required properties (per @type) |
WARNING | Known types (Product, Organization, WebSite, LocalBusiness, Article, BreadcrumbList, FAQPage, Offer, Review, AggregateRating) missing Google-required fields. |
| Missing recommended properties | INFO | Optional fields absent — rich results may be thinner but markup is partially valid. |
| Missing expected schema for site type | INFO | Organization, WebSite, or Product (WEBSHOP only) not present at all on the homepage. |
How each check works
- Fetch — GET and parse homepage with Cheerio (default timeout 10s).
- Extract JSON-LD — Parse each ld+json script; flatten arrays and
@graphentries into objects. - Microdata count — Count
[itemscope]elements (metrics only unless both JSON-LD and microdata are zero → WARNING). - Invalid JSON — Count scripts that fail
JSON.parse; one aggregate WARNING if any invalid. - Property validation — For each recognized
@type, comparerequiredPropsandrecommendedPropsfromSCHEMA_REQUIREMENTS; empty/missing values failhasProperty. - Expected types — If site is WEBSHOP/WEBSITE and Organization, WebSite, or (WEBSHOP) Product is entirely absent → INFO “Missing X schema”.
- Score — −30 no markup, −15 per invalid block, −10 per WARNING, −3 per INFO.
Caveats and concerns
- Homepage-only — Product schema on PDP URLs is missed if homepage lacks it.
- Microdata not validated — Only counted; property rules apply to JSON-LD only.
- Unknown @types ignored — Custom or niche schema.org types get no property checks.
- Nested graphs — Flat extraction may miss deeply nested entities depending on structure.
- API targets — Plugin allows API target type in requirements list but plugin
targetTypesare WEBSITE/WEBSHOP only.
Source
packages/test-plugins/src/plugins/structured-data-validator.ts