=== CacheWing ===
Contributors: dmahasan
Tags: cache, performance, page speed, minify, lazy load
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight caching plugin: full-page cache, CSS minify, JS defer, font optimization, and image lazy-load — built for Core Web Vitals.

== Description ==

**CacheWing** is a fast, no-bloat WordPress performance plugin built to improve page speed and Core Web Vitals scores without the complexity of a full-featured caching suite. It does five things, and does them well:

* **Full-Page Caching** — serves static HTML snapshots to logged-out visitors so PHP and the database are skipped entirely on repeat requests.
* **CSS Minification** — automatically minifies first-party stylesheets and serves the minified version from a local cache.
* **JavaScript Deferral** — defers non-critical scripts so the browser can paint the page before running them, with an exclude list for scripts that must load immediately.
* **Font Optimization** — loads Google Fonts asynchronously so web fonts never block the initial render.
* **Lazy Loading** — adds native lazy-loading to images and iframes below the fold, while protecting your Largest Contentful Paint (LCP) image from being delayed.

Built for site owners and developers who want a fast, transparent, single-purpose caching plugin — not a 40-tab settings panel.

= Why CacheWing =

Most all-in-one caching plugins bundle features you'll never use and settings that are hard to reason about. CacheWing focuses only on the optimizations that move Google PageSpeed Insights and Core Web Vitals scores, with sane defaults that work out of the box.

= Features at a glance =

* One-click cache clearing from the admin bar
* Automatic cache purge on publish/update, new comments, theme switch, and plugin activation/deactivation
* Per-script exclude list for JavaScript deferral
* Cache status dashboard (pages cached, disk usage)
* Zero external dependencies, zero tracking, zero telemetry

== Installation ==

1. Upload the `cachewing` folder to `/wp-content/plugins/`, or install the zip directly via Plugins → Add New → Upload Plugin.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Settings → CacheWing to review the default settings (all optimizations are enabled by default).

== Frequently Asked Questions ==

= Will this conflict with another caching plugin? =

Deactivate any other page-caching plugin before activating CacheWing — running two full-page cache plugins at once can cause stale content or conflicts.

= Does it cache pages for logged-in users? =

No. Full-page caching only applies to logged-out visitors, so logged-in editors and admins always see a live, uncached version of the page.

= Will minifying my CSS break my design? =

CacheWing only minifies first-party stylesheets (files served from your own domain) using safe whitespace/comment stripping — it does not restructure selectors, so visual regressions are extremely unlikely. You can turn CSS minification off at any time from the settings page.

= How do I exclude a script from being deferred? =

Add its registered script handle (the name used in `wp_enqueue_script()`) to the "Exclude handles" field on the settings page, comma-separated.

== Changelog ==

= 1.0.3 =
* Renamed the plugin from "DM Super Cache" to "CacheWing" at the request of the WordPress.org Plugins Team, since "Super Cache" was judged too close to the existing "WP Super Cache" plugin name.
* Updated text domain to `cachewing` to match the new name.
* Fixed the last two WordPress.org Plugin Check findings: moved a misplaced `phpcs:ignore` comment onto the exact flagged line in the font-preload code, and isolated an `ABSPATH` file-path lookup into its own function in the CSS minifier so it no longer trips the ABSPATH/file-write heuristic check.
* No functional changes — caching, minification, defer, font, and lazy-load behavior is unchanged from 1.0.2.

= 1.0.2 =
* Updated "Tested up to" to WordPress 7.1.
* Shortened the readme short description to meet WordPress.org's 150-character limit.
* Hardened input handling: all `$_SERVER`/`$_POST`/`$_REQUEST` reads are now unslashed and sanitized before use.
* Switched cache file read/write/delete operations to the WP_Filesystem API instead of raw PHP filesystem calls, only when the "direct" filesystem method is available (falls back to safe direct PHP file calls otherwise, so nothing ever prompts for FTP credentials on the front-end).
* Replaced `parse_url()` with `wp_parse_url()` and `unlink()` with `wp_delete_file()`.

= 1.0.1 =
* Updated "Tested up to" to WordPress 7.0.
* Minor readme and plugin metadata cleanup.

= 1.0.0 =
* Initial public release: full-page cache, CSS minification, JS defer, font optimization, lazy-loading, and admin settings page.

== Upgrade Notice ==

= 1.0.3 =
* Plugin renamed to CacheWing (was DM Super Cache) per WordPress.org naming policy. Same plugin, same settings, new name only.

= 1.0.2 =
* Security and code-quality hardening for WordPress.org plugin review; no settings changes needed.

= 1.0.1 =
* Updated "Tested up to" to WordPress 7.0.
* Minor readme and plugin metadata cleanup.

= 1.0.0 =
First public release.
