=== Clearyvo Speed Audit ===
Contributors: kishollo001
Tags: speed, performance, core web vitals, pagespeed, slow plugins
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.5.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find slow pages and heavy plugins: server build time, page cache, JS/CSS weight per plugin, plugin load times and Core Web Vitals.

== Description ==

Speed Audit answers three questions: which pages are slow, which plugins make them heavy, and what Google measures for real visitors.

**Pages**

* Time to first byte as a visitor gets it (page cache included)
* Server build time with caches bypassed: the PHP and database work behind each page
* Database queries and peak memory per page
* Timeline of the page build (plugins loaded, init, query, head, footer)
* Page cache detection (LiteSpeed, Cloudflare, Varnish, nginx, WP Rocket, WP Super Cache and others)
* HTML size and compression

**Plugins**

* JavaScript and CSS each plugin and the theme add to your pages, with file counts and sizes
* Optional load-time profiler: a tiny must-use file that measures how long each plugin takes to load and how much memory it uses, only during Speed Audit measurements

**Core Web Vitals**

* PageSpeed Insights score and lab metrics (LCP, TBT, CLS, FCP) for mobile or desktop
* Real-visitor data (LCP, INP, CLS, TTFB) from the Chrome UX Report when Google has enough traffic data for your site
* The biggest improvement opportunities reported by Lighthouse

**Checked elsewhere in the family**

* Autoloaded options and the plugin that added them: Database Cleanup
* PHP version, OPcache, object cache and limits: Hosting Checker; overdue cron events: Cron Jobs (both in the Site Toolkit plugin)

Speed Audit is read-only: it never changes settings, files or the database (apart from the optional profiler file you install yourself).

Part of the Clearyvo plugin family: focused plugins that each check one part of your site and share one "Site Toolkit" menu with a Site health score. The Site Toolkit plugin has every checker in one plugin, switched on one by one; when it is installed, this plugin's settings and results are shared with it. More at wp-sitechecker.com.

== External services ==

This plugin connects to Google APIs only when you click "Web Vitals" for a page:

* **PageSpeed Insights API** (`https://www.googleapis.com/pagespeedonline/v5/runPagespeed`): the URL of the page you test (a public page of your site), the device type and, if you entered one, your Google API key are sent. Google loads and analyzes that public page. [Terms](https://developers.google.com/terms) · [Privacy](https://policies.google.com/privacy)
* **Chrome UX Report API** (`https://chromeuxreport.googleapis.com/v1/records:queryRecord`): only when you entered a Google API key and PageSpeed Insights returned no real-user data. The page URL (or your site's origin), the device type and your key are sent. [Terms](https://developers.google.com/terms) · [Privacy](https://policies.google.com/privacy)

No visitor data is sent anywhere. Page measurements are requests from your server to your own site.

== Installation ==

1. Upload the plugin and activate it.
2. Open Site Toolkit → Speed Audit and click "Measure all pages".
3. Optional: install the profiler for per-plugin load times, and add a free Google API key for reliable Core Web Vitals.

== Frequently Asked Questions ==

= What is the /wp-json/clearyvo/v1/app/ address? =
A read-only REST route for the Clearyvo Site Inspector Mac app. It shows the Site health score of the Clearyvo plugins to a signed-in administrator (for example with a WordPress Application Password) and changes nothing. It sends nothing anywhere: the app asks, the site answers.

= Why does the visitor TTFB differ from what my browser shows? =

The measurement runs from your own server, so the network distance to your visitors is not included. It shows how fast the site itself answers.

= "No timings came back" =

A page cache or security plugin answered the measurement request before WordPress ran. The other numbers are still valid.

= Does the profiler slow down my site? =

No. Without a one-time measurement token in the request it does nothing. It is removed when you remove it on the plugin page or deactivate Speed Audit.

= Web Vitals fails for my local or staging site =

Google can only test pages that are reachable from the public internet.

== Free and Pro ==
Everything in this plugin is free. Clearyvo Pro is one add-on for the Pro features of the whole family (image optimisation, AI ALT texts, alerts by email, white-label reports); this checker has none of its own.

== Changelog ==
= 0.5.5 =
* Shared Clearyvo framework 2.3.1: the SEO checker is listed as Clearyvo SEO (formerly Image Alt & SEO) everywhere, whichever Clearyvo plugin loads the framework.

= 0.5.4 =
* Request handlers check their nonce where they read the request.

= 0.5.3 =
* New icons: one design for the whole Clearyvo family, with a colour per group of checkers.

= 0.5.2 =
* The other checkers in the shared menu have their new names (SSL Checker, Security Checker, Indexing Checker and the rest).

= 0.5.1 =
* The plugin links point to wp-sitechecker.com again, until the site has moved to clearyvo.com.

= 0.5.0 =
* New: read-only connection for the Clearyvo Site Inspector Mac app (Site health as data, for administrators with an Application Password).

= 0.4.1 =
* Links to the new home of the Clearyvo WordPress plugins: clearyvo.com/wordpress.

= 0.4.0 =
* First release under the Clearyvo name (folder and text domain: clearyvo-speed-audit). Settings and results of the earlier versions are kept; activating this plugin switches the earlier copy off.
