Product Page Health (product-page-health)
Summary
Checks product detail page signals: price, media, add-to-cart, and JSON-LD Product (B2B-aware).
Classification
- Category:
ECOMMERCE - Plugin id:
product-page-health - Version:
1.1.0 - Target types:
WEBSHOP - Weight class:
MEDIUM - Risk level: not set on plugin object
- Browser required: Yes (Playwright)
- Tier / group: Tier 3 — E-commerce / flows (Playwright)
Schedule
- scheduleHints:
{ defaultInterval: '0 */6 * * *', priority: 6 } - 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 |
|---|---|
productUrl |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
priceSelector |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
addToCartSelector |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
timeout |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
Runtime / injected config
_secrets,_fingerprint,_requiresLoginForPurchase,_hasEverPassed— same B2B family as checkout-flow.
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 product-page-health.
B2B/login-gated shops treat missing price/cart as INFO instead of WARNING.
| Check | Typical severity | Why |
|---|---|---|
| B2B — requires login credentials (no secrets configured) | INFO | Price/cart hidden behind login is expected; test exits early with passed status. |
| B2B login failed | WARNING | Authenticated PDP checks cannot run; downstream price/cart findings may be false. |
| Product price hidden (element exists but not visible) | INFO if B2B; WARNING if consumer | Shoppers cannot see price — blocks purchase decisions on consumer shops. |
| No price element (CSS selector miss) | INFO if B2B; WARNING if consumer | Missing price on PDP is a direct conversion blocker for open catalog shops. |
Broken images (naturalWidth === 0) |
WARNING | Broken product photos reduce trust and increase bounce on PDPs. |
| Add-to-cart hidden (exists in DOM via fallback heuristics may still pass) | WARNING | Hidden buy buttons hurt mobile conversion and accessibility. |
| No add-to-cart button | INFO if B2B; WARNING if consumer | Cannot purchase without a discoverable cart action on consumer shops. |
No JSON-LD @type: Product |
INFO | Missing rich-result schema limits product visibility in Google Shopping/snippets. |
Possible B2B shop (first run: both price and cart missing, _hasEverPassed false) |
INFO | Downgrades price/cart findings to INFO; sets _suspectedB2B for worker auto-flag. |
How each check works
- Early B2B skip — If B2B flagged and no secrets → INFO finding, return
passedwithout browser checks. - Optional login — B2B + credentials →
performLoginbefore PDP navigation. - Product discovery — Uses
productUrlor discovers via collection links / JSON-LD (same patterns as checkout-flow). - Four checks — (1) visible price via configurable selectors (default broad
.price, Shopify/Woo patterns); (2) brokenimg; (3) visible add-to-cart or DOM/text fallback; (4) JSON-LD Product presence. - B2B scoring — On B2B sites, missing/hidden price or cart still increments passed count after INFO finding.
- First-run heuristic — When not B2B, never passed before, and both price+cart findings fire → downgrade those to INFO +
_suspectedB2Bmetric. - Score and status —
passed / 4 × 100. Statuswarningif any WARNING (no CRITICAL findings emitted).
Caveats and concerns
- Single PDP — One product page per run; catalog-wide issues may be missed.
- Selector defaults — Custom themes may need
priceSelector/addToCartSelectoroverrides in target test config. - Hover-reveal buttons — Hidden-until-hover carts pass if
findButtonInDOMfinds a match in DOM. - JSON-LD optional — INFO only; many valid shops omit structured data.
- Does not click add-to-cart — Unlike checkout-flow, only verifies presence/visibility.
Source
packages/test-plugins/src/plugins/product-page-health.ts