=== HTML Size Checker ===
Contributors: aiadvantageagency
Tags: seo, googlebot, crawl, technical seo, html size
Requires at least: 5.5
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See the rendered HTML size of every post in your Posts list — exactly what Googlebot sees — color-coded for instant review.

== Description ==

**Google's Googlebot has a 2MB HTML size limit. Content beyond that is silently truncated — and Search Console won't warn you.**

HTML Size Checker adds a sortable **HTML Size** column directly to your WordPress Posts and Pages list. It fetches the actual rendered HTML of each published post — the full page as Googlebot receives it, including theme markup, schema, and page builder output — and displays the size in KB or MB, color-coded for quick review.

🟢 **Green** — under 500KB (you're safe)
🟡 **Yellow** — 500KB–1MB (keep an eye on it)
🔴 **Red** — over 1MB (review recommended)

**Why this matters for SEO:**
Most page size tools measure total page weight (HTML + CSS + JS + images). Googlebot's 2MB limit applies only to the HTML document itself. This plugin measures exactly that — the number that counts for indexing.

**Features:**
- HTML Size column in the Posts and Pages list
- Color-coded indicators (green / yellow / red)
- Per-post Refresh link
- Bulk Scan All Posts button
- Sortable column (sort posts by size)
- Cached results stored in post meta (refreshed every 7 days or on demand)
- Graceful error handling for server restrictions (e.g. WP Engine loopback issues)
- Zero impact on front-end performance — runs only in wp-admin

**Built by [AI Advantage Agency](https://aiadvantageagency.com)** — specialists in AEO, Answer Engine Optimization, and paid media.

== Installation ==

1. Download the plugin zip file
2. In your WordPress admin, go to Plugins > Add New > Upload Plugin
3. Choose the zip file and click Install Now
4. Click Activate Plugin
5. Go to Posts > All Posts
6. Click Scan All Posts Now in the blue notice bar to run your first scan
7. The HTML Size column will populate with color-coded results

== Frequently Asked Questions ==

= Will this slow down my site? =
No. The plugin runs exclusively in wp-admin and has zero effect on your public-facing pages or PageSpeed scores. The fetch requests only run when you manually trigger a scan or click Refresh on an individual post.

= What exactly is being measured? =
The rendered HTML of each post — the full page as a browser or Googlebot would receive it, including your theme's header, footer, sidebar, schema markup, and page builder output. This is the number that matters for Googlebot's 2MB crawl limit.

= Why does it say "Fetch failed" on some posts? =
Your server may be blocking loopback HTTP requests — common on some WP Engine configurations and other managed hosts. Contact your host about enabling loopback requests. Alternatively, check individual post sizes using Chrome DevTools: F12 > Network tab > reload the page > filter by "Doc" > check the size of the HTML document.

= How often does it refresh automatically? =
It doesn't refresh automatically. Results are cached in post meta. Use the Refresh link on any individual post, or click Scan All to re-run a full scan.

= Does this work for Pages too? =
Yes. The HTML Size column appears on both the Posts list and the Pages list.

= Is 170KB a good HTML size? =
Yes — very good. The median HTML page is around 33KB and 90% of pages are under 151KB. Googlebot's 2MB limit only becomes a concern for pages roughly 67x larger than average.

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release — install and run Scan All to populate your HTML sizes.
