=== Vitals Pulse ===
Contributors: yodsira
Tags: core web vitals, performance, monitoring, rum, lcp, inp, cls
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-user Core Web Vitals monitoring: a tiny beacon, a p75 dashboard in wp-admin, and your data stays on your site.

== Description ==

Vitals Pulse measures what real visitors actually experience - not synthetic lab tests. A ~1.5 KB deferred beacon loads the official Google web-vitals library for a sampled share of your non-admin visitors and reports LCP, CLS, INP, FCP and TTFB to your own site.

Your wp-admin gets a clear dashboard: p75 per metric for the last 7 days with Google's thresholds (LCP < 2.5 s, INP < 200 ms, CLS < 0.1), daily sparklines and a breakdown by page type (home / post / page / product).

Privacy by design: administrators are never measured, URLs are stored as md5 hashes, raw samples roll up into daily histograms within ~24-48 hours and old aggregates are pruned automatically. No third-party SaaS, no monthly subscription - unlike every hosted RUM tool.

= Free features =

* Real-user beacon (deferred, non-blocking, every Nth visitor - you choose N)
* p75 dashboard for LCP, CLS, INP, FCP, TTFB with pass/fail thresholds
* 7-day daily sparklines (inline SVG, no JS libraries)
* Breakdown by page type
* Rate-limited, strictly validated REST endpoint
* One-click data deletion

== Installation ==

1. Upload the `vitals-pulse` folder to `/wp-content/plugins/`, or install the ZIP via Plugins - Add New.
2. Activate the plugin.
3. Open the "Vitals Pulse" menu and check that the beacon is enabled.
4. Data starts flowing with real visitor traffic; the dashboard fills within a day.

== Frequently Asked Questions ==

= Why is my dashboard empty? =

The beacon samples a share of non-admin visitors. Give it a day of real traffic. Visits by logged-in administrators are never recorded.

= Does this slow my site down? =

No. Both scripts load with `defer`, the sender is ~1.5 KB, and sampling means most page views load nothing at all.

= What happens to my data if I uninstall? =

Everything is deleted - raw samples, aggregates, settings. That is a privacy feature.

= Is it compatible with caching plugins? =

Yes. The beacon script is a static asset and the endpoint is public; cached pages work fine.

== Changelog ==

= 1.0.0 =
* Initial release: RUM beacon, 7-day p75 dashboard, page-type breakdown, histogram aggregation, sampling control.
