=== HyperCache by Braingig ===
Contributors: braingig
Tags: cache, performance, speed, optimization, page cache
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight WordPress performance suite featuring full-page caching, CDN integration, asset optimization, database cleanup, and built-in security.

== Description ==

HyperCache by Braingig is the ultimate **set-it-and-forget-it** WordPress performance suite. Designed to eliminate "plugin bloat", WP HyperCache replaces up to 5 different plugins by combining enterprise-grade Page Caching, File Optimization, Image Lazy Loading, Database Cleanup, and Basic Security Hardening into a single, cohesive dashboard with zero conflicts.

Achieve 100/100 Google PageSpeed Insights (Core Web Vitals) scores out of the box.

### 🔥 Why HyperCache?

Stop paying high yearly subscriptions for caching plugins and separate image optimizers. HyperCache delivers 100% feature parity with premium competitors for free. 
It features a built-in **PageSpeed Insights Scanner** and an **Auto-Fix** button that automatically toggles the exact settings you need to fix your website's performance bottlenecks.

### 🚀 Advanced Performance Engine (100% Free)

* **Lightning Fast Page Caching:** Disk-based HTML caching with atomic file writes and stampede protection.
* **Auto-Activate:** Page caching, GZIP, and minification are instantly enabled the moment you hit "Activate".
* **Remove Unused JS (Extreme Delay):** Aggressively delays heavy 3rd-party trackers (Analytics, Pixels) until the first user interaction, instantly solving main-thread blocking warnings.
* **Edge Side Includes (ESI):** Cache your entire WooCommerce store while dynamically "punching holes" in the cache to serve real-time cart and checkout widgets.
* **True Object Caching:** Native Redis and Memcached interceptors bypass heavy MySQL queries, built directly into the UI. No separate Object Cache plugin needed.
* **Cloudflare Edge Integration:** Hook your origin server directly to the Cloudflare API. Publishing a post instantly fires an automated Zone Purge event across the globe.

### 🗜️ Complete File & Asset Optimization

* **Minification & Combination:** Safely minify and combine HTML, CSS, and JavaScript.
* **JS Defer & Delay:** Native script deferment with localized exclusion filters.
* **Font Optimization:** Automatically injects `font-display:swap`, async loading, and preload hints for Google Fonts.
* **Frontend Cleanup:** Strips core WordPress bloat (emojis, embeds, dashicons, heartbeat API, query strings, and jQuery Migrate).

### 🖼️ Next-Gen Media

* **Native Lazy Loading:** Defers off-screen images, iframes, and CSS background images. 
* **YouTube Facades:** Replaces heavy YouTube iframe embeds with clickable, lightweight preview images.
* **Missing Dimensions:** Automatically injects `width` and `height` attributes to fix Cumulative Layout Shift (CLS) penalties.
* **Free Image CDN:** Built-in Jetpack Photon adapter for instant, completely free global image delivery.

### 🛡️ Basic Security Hardening

Why install a heavy security plugin just for basic protection?
* **Security Headers:** Auto-injects `Strict-Transport-Security`, `X-Frame-Options`, `X-Content-Type-Options`, and `X-XSS-Protection`.
* **Limit Login Attempts:** Built-in brute-force migration with IP lockouts and configurable retry limits.
* **Hide Login URL:** Mask your `wp-login.php` path to evade automated bot nets instantly.
* **Disable File Editor:** Hardens WordPress by preventing theme/plugin edits via the dashboard.

### 🛠️ Developer & Agency Ready

* **CLI Support:** Full WP-CLI command integration (`wp hypercache purge_all`, `wp hypercache enable`).
* **Multisite Native:** Network isolated cache engines ensure subdirectory and subdomain networks never suffer from cache poisoning.
* **Varnish & Nginx:** Direct PURGE and BAN routing for server-side caching systems.
* **WooCommerce / WPML:** Auto-excludes dynamic cart hooks and segments caching logically by language translation keys.

== Frequently Asked Questions ==

= Does HyperCache work with WooCommerce or Easy Digital Downloads? =
Yes! It automatically detects eCommerce installations and intelligently bypasses cache for the cart, checkout, and account endpoints. The new ESI (Edge Side Includes) engine also allows you to dynamically load cart fragments on cached pages.

= Is it compatible with Multisite? =
Absolutely. HyperCache's directory mapper fully isolates subdirectories and subdomains so purging cache on Site A does not wipe Site B.

= Do I need a separate Security plugin? =
For malware scanning, yes. But for basic hardening (Headers, Brute Force protection, Login Masking), HyperCache handles it natively so you can uninstall lighter security plugins.

= Will "Delay JS" break my site? =
Our default exclusion list is highly tuned to protect core WordPress functionality (like jQuery). You can easily exclude specific broken scripts from the File Optimization tab.

**Premium Features:**
* Critical CSS generation pipeline
* Unused CSS removal
* Image optimization with WebP/AVIF conversion

== Installation ==

1. Upload the `wp-hypercache` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Navigate to HyperCache → Dashboard to configure

== Changelog ==

= 2.1.1 =
* Fixed: PreloadProcess is now always properly wired to Preloader, ensuring background queues start correctly even if auto-preload on publish is disabled.
* Fixed: Preload queue dispatch interval reduced from 60 seconds to 5 seconds for a much faster, fully responsive UI progress bar.
* Fixed: JavaScript AJAX polling logic no longer shows "Complete" prematurely while the backend is still discovering URLs.

= 2.1.0 =
* Major Release: 100% Feature Delivery
* Added Auto-Activate on Install (Page Caching, Minify, GZIP)
* Added ESI (Edge Side Includes) Engine for cart dynamic holes
* Added Remove Unused JS logic via extreme delaying (interaction triggers)
* Built WP-CLI support (enable, disable, purge_all, flush_object_cache)
* Programmed Multisite Network Isolation for segregated caching

= 1.0.0 =
* Initial release
* Full-page caching engine with advanced-cache.php drop-in
* Browser cache, CDN rewriting, preload engine
* HTML/CSS/JS optimization pipeline
* Lazy loading, font optimization, frontend cleanup
* WooCommerce, multilingual, and object cache integrations
* Edge cache adapters (Cloudflare, Varnish, Nginx)
* Database cleanup module
* Pro module registration system
* Admin dashboard, settings, REST API, WP-CLI
