=== Lightify - All-in-One Cache & Performance Optimization & Core Web Vitals ===

Contributors: daftplug
Tags: cache, performance, core web vitals, optimize, lazy load
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

All-in-one performance toolkit: page cache, front-end cleanup, resource hints, iframe lazy-load, and real-visitor Core Web Vitals monitoring.

== Description ==

Lightify is a lightweight, all-in-one performance helper for WordPress. It bundles a small set of safe, well-understood optimizations you can toggle from a single settings page — no external services, no minified code, and no edits to wp-config.php. Every feature ships off by default, so installing or updating changes nothing until you choose to enable it.

= What it does =

- **Page Cache** – Optionally serve a saved copy of pages to logged-out visitors so WordPress can skip rebuilding them on every request. The cache is stored in `wp-content/cache/lightify/`, is cleared automatically whenever you publish or edit content, and can be cleared manually at any time. Logged-in users, commenters, and requests with query strings are never cached.
- **Core Web Vitals monitoring** – Optionally measure real-visitor LCP, CLS, INP, FCP, and TTFB directly in the browser using the standard PerformanceObserver API, and view the 75th-percentile results and rating breakdown on the settings page. Measurements are stored on your own site only.
- **Bloat Removal** – Optionally disable emojis, dashicons (front end), block editor CSS, jQuery Migrate, oEmbed discovery, XML-RPC, and RSS feeds.
- **Network Improvements** – Add `preconnect` and `dns-prefetch` resource hints for the origins you specify, printed by WordPress in the document head.
- **Media** – Add native `loading="lazy"` to iframes in your post content.

Every optimization is off or on by a simple checkbox and applies only where noted. If something looks off, just turn the relevant option back off.

== Frequently Asked Questions ==

= How does the page cache work? =

When enabled, Lightify saves the rendered HTML of anonymous page views as plain files under `wp-content/cache/lightify/` and serves them on later requests. It does not install an `advanced-cache.php` drop-in or modify `wp-config.php`, so it stays fully self-contained and reversible — turning the feature off (or clearing the cache) simply stops using the saved files. It is compatible with running alongside a server-level cache.

= What is cached, and what is not? =

Only safe requests are cached: GET requests with no query string from logged-out visitors that return a normal HTML page. Admin, AJAX, REST, cron, and XML-RPC requests, logged-in users, commenters, WooCommerce cart/session visitors, and 404/search/feed/preview/password-protected pages are never cached.

= Does Core Web Vitals monitoring send data anywhere? =

No. The measurement script is first-party (shipped with the plugin, no third-party library) and reports only to a REST endpoint on your own site. The data is stored in a single custom table on your database and is never transmitted to any external service.

= Will it break my site? =

Each feature is individually toggleable and uses standard WordPress hooks. If a setting causes an issue with your theme or another plugin, simply disable it.

= Where do the resource hints appear? =

Lightify adds your preconnect and dns-prefetch origins through the core `wp_resource_hints` filter, so WordPress prints them in the `<head>` of your pages.

== Screenshots ==

1. The Lightify settings page with Caching, Core Web Vitals, Bloat Removal, Media, and Network Improvements options.
2. The Core Web Vitals dashboard showing p75 values and rating breakdowns.

== Changelog ==

= 1.0.1 =
* Added a safe, self-contained page cache with automatic and manual purging.
* Added real-visitor Core Web Vitals monitoring (LCP, CLS, INP, FCP, TTFB) with an on-page dashboard.
* Renamed the plugin to "Lightify - All-in-One Cache & Performance Optimization & Core Web Vitals".

= 1.0.0 =
* Initial release.

== External services ==

This plugin does not connect to, or transmit any data to, any external service. The page cache and Core Web Vitals monitoring both run entirely on your own WordPress installation; vitals data is stored only in your site's database.

== Source Code ==

Lightify contains no minified, compiled, or obfuscated code. All PHP, CSS, JavaScript, and other source files shipped in the plugin are the original human-readable source and require no build step. The admin stylesheet (`assets/css/admin.css`) and the Core Web Vitals collector (`assets/js/vitals.js`) are enqueued directly in their readable form.
