wp2next compliance
A read-only scan for gaps in privacy pages, consent, accessibility, form consent and security headers, with a written report. Not legal advice.
| Synopsis | wp2next compliance [<url>|all] (Claude desktop and Claude Code plugin: /wp2next:compliance; Codex: $wp2next compliance; Cursor: /wp2next compliance) |
|---|---|
| Changes code | No. If the scanner's browser tools are missing from the project, it asks before adding them as dev dependencies |
| Touches outside services | It loads pages only. It never clicks a consent banner, never submits a form, never logs in. A protected Vercel deployment needs a bypass secret, which you create in Vercel and store yourself |
| Reads | The site's pages (WordPress or the new build), wp2next.json (compliance.regions, compliance.industry, tracking) |
| Writes | .compliance/reports/<date>[-label].md and .json; compliance.lastScan in wp2next.json; with your yes, your regions and industry |
What it does
It opens the site in a real browser and checks:
- privacy, terms and cookie pages, and whether they're linked;
- the consent banner against the trackers that actually fire, including what loads before consent (EU/UK) and US state items (a Do Not Sell or Share link, Global Privacy Control);
- accessibility with axe-core (WCAG 2.2 AA) plus a manual checklist;
- form consent wording (CAN-SPAM, TCPA, SMS), including the marketing-consent text HubSpot needs when forms create marketing contacts;
- industry triggers (health, legal, finance, real estate, alcohol/cannabis, education, nonprofit, kids);
- security headers.
Each finding has a severity (high, medium, low, info). Findings that depend on facts the scan can't know (is the business covered by a law, are phone numbers used for marketing) are marked needs-human and asked as questions, never called violations.
It never says a site is compliant. Every report and summary says "not legal advice". The best result is "no open high findings". If you ask "do I legally need X?", it says the scan can't decide that and points you to a lawyer.
Findings become work elsewhere: consent and tracker issues go to
tracking or the build; missing legal pages need text from the client or their consent
banner's policy generator (wp2next builds the page and footer link, never the legal text); form wording
needs the client's approval; accessibility fixes go into shared components.
When to run it:
| When | Target |
|---|---|
| Phase 1 (baseline) | The WordPress site in Local, and the live domain if you agree |
| Phase 12 (pre-launch gate) | The production deployment with tracking switched on, before DNS moves. Passes when every high finding is fixed or accepted in writing |
| Right after DNS moves | The live domain (--label postlaunch); a new high finding is a launch bug |
| Any time | After tracking, consent banner or form changes; before handoff |
A build with analytics switched off (the default on previews before launch) can't pass the gate: the report says "Analytics is switched off on this build".
Arguments and options
| Argument | Effect |
|---|---|
| (none) | Asks what to scan, recommending the production deployment in phase 12, else a running local build, else the WordPress copy |
<url> | A bare origin scans up to 25 sitemap pages; a URL with a path scans that page plus the home page |
all | The whole sitemap (up to 500 pages; a few seconds per page) |
The agent adds labels such as baseline, prelaunch and postlaunch so reports from the same day
don't overwrite each other.
Examples
/wp2next:compliance https://acme.local/wp2next:compliance https://acme.local$wp2next compliance https://acme.local/wp2next compliance https://acme.localwp2next compliance: let it suggest the right target for the current phase.wp2next compliance all: the whole sitemap.wp2next compliance https://example.com/contact/: one page plus the home page.
Reports contain URLs, cookie names and public tag IDs, no secrets. Commit them if the repo is private
(handoff links them); keep .compliance/ out of a public repo.
Related
- Compliance guide · Compliance scan (optional extra)
tracking·audit·handoff- Scripts:
compliance-scan.mjs· Environment variables:VERCEL_AUTOMATION_BYPASS_SECRET - Agent instructions:
references/commands/compliance.md (external site)