Files
wp-healthcheck/includes/steps/74-search-console.php
Steve Hanlon 8e288e1ef6 Plugin: add Google Analytics + Search Console healthcheck steps (hc-u5c)
Slot two new steps between performance (Step 7) and security (Step 8):

- 72-analytics.php: sniffs the homepage for GA4 (G-), GTM, and legacy UA
  measurement IDs plus known loader URLs (gtag.js, gtm.js, analytics.js,
  ga.js) and detects common analytics/tag plugins. Warns if only UA is
  still in use.

- 74-search-console.php: looks for google-site-verification meta tags on
  the homepage, probes for a reachable sitemap (wp-sitemap.xml, then
  sitemap_index.xml, then sitemap.xml), parses robots.txt for a
  Googlebot/* Disallow: /, flags the WP "Discourage search engines"
  setting when on, and notes whether Site Kit is active.

Titles use the "Step —" (unnumbered) convention already used by the
email and handover steps so the existing numbered steps don't shift.
steps.md updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-16 09:45:07 +01:00

7.6 KiB