=== Caresort Performance Monitor ===
Contributors: caresortsolutions
Tags: performance, page speed, core web vitals, slow website, site speed
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find out exactly WHY your WordPress site is slow — not just that it is.

== Description ==

Most WordPress performance plugins tell you to install a cache. This one tells you **why your site is slow** with clear diagnostics and specific, actionable fixes.

= What it analyzes =

* **Performance score** — composite score out of 100 across all five areas
* **Core Web Vitals** — LCP, CLS, FCP and Total Blocking Time via Google PageSpeed Insights
* **Page size analysis** — Time to First Byte (TTFB), render-blocking resources, caching status
* **Image analysis** — oversized images, missing WebP versions, missing lazy loading
* **Plugin impact** — active plugin count, 15 known performance-heavy plugins identified
* **Database health** — post revisions, autoloaded options, transients, orphaned meta
* **Prioritised recommendations** — every issue explained with a specific, actionable fix

= How it works =

Scans run on-demand when you click "Scan Now". Results are cached for one hour so the scan never affects your visitors. Each issue shows a severity level (Critical / Warning / Info), a plain-English explanation, and a concrete fix.

= Works with WebsiteCare =

If the Caresort Site Health Monitor (WebsiteCare) plugin is installed, Performance Monitor integrates into its admin menu automatically.

== External Services ==

This plugin connects to the Google PageSpeed Insights API to retrieve Core Web Vitals data (LCP, CLS, FCP, Total Blocking Time) for the URL you have configured in Settings.

**What data is sent:** The URL of the page you have configured to monitor (default: your homepage). No personal data, user data, or site credentials are sent.

**When it is sent:** Only when an administrator manually clicks "Scan Now" in the WordPress admin. It is never triggered automatically or on visitor page loads.

**Service provider:** Google LLC
**Service:** Google PageSpeed Insights API v5
**Terms of Service:** https://developers.google.com/terms
**Privacy Policy:** https://policies.google.com/privacy

The plugin also makes a server-side HTTP request to your own site's homepage to measure page size and server response time (TTFB). This request goes to your own server and no data is sent to any external party.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/caresort-performance-monitor/`
2. Activate the plugin through the Plugins menu in WordPress
3. Go to Performance (or WebsiteCare → Performance if WebsiteCare is installed)
4. Click "Scan Now" to run your first analysis

== Frequently Asked Questions ==

= Do I need a Google API key? =
No. Core Web Vitals work without a key via the public Google PageSpeed endpoint. Adding a free API key in Settings prevents rate limiting.

= How long does a scan take? =
Typically 5–30 seconds depending on your server speed and the PageSpeed API response time.

= Will the scan affect my site's visitors? =
No. The scan runs server-side and is triggered only by an admin user clicking Scan Now. It is never visible to your site's visitors.

= What data does the plugin send externally? =
Only the URL you have configured to monitor is sent to Google PageSpeed Insights, and only when you manually trigger a scan. See the External Services section for full details.

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Screenshots ==

1. The full dashboard showing a complete performance analysis with score, five analysis cards and database health breakdown.
2. The scan running in real time — each diagnostic area reports as it completes.
3. Your performance score out of 100 with a per-category breakdown showing exactly where points were lost.
4. The prioritised recommendations list — every issue ranked Critical, Warning or Info with a plain-English explanation and a specific fix.
