=== Beky Cache Pilot ===
Contributors: bekyplugins
Tags: performance, optimization, cache, preload, compatibility
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2+
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Compatibility-first WordPress performance for Elementor, Divi, Bricks, Beaver Builder, and WooCommerce — fast sites that do not break your builder.

== Affiliation ==

Beky Cache Pilot is a product of [Beky](https://beky.io/). Official site: [beky.io](https://beky.io/). Documentation: [beky.io/docs](https://beky.io/docs). Support: support@beky.io

== Description ==

Beky Cache Pilot is built for compatibility first: Safe Mode is enabled by default, builder detection runs before caching, and each module can be enabled independently — so you get Core Web Vitals gains without breaking editors, dynamic widgets, or checkout flows.

Works on any hosting. No server lock-in. No aggressive defaults.

= Why Beky Cache Pilot? =

* **Builder-safe full page cache** — Detects Elementor, Divi, Bricks, Beaver Builder, and WP Bakery. Scans Elementor pages for real dynamic triggers (menus, carts, forms) and only bypasses cache when needed. Static builder pages can be cached when safe.
* **Safe Mode on by default** — Conservative optimizations until you explicitly opt in.
* **WooCommerce that actually works** — Automatic bypass on cart, checkout, account, and dynamic product queries. Personalized cart markup is stripped from stored HTML. Shop assets load only where needed.
* **Smart conditional asset unloading** — One-click presets for Contact Form 7, WooCommerce, Elementor core, Elementor Swiper (carousel only), Elementor gallery, WP Bakery, Beaver Builder, and SiteOrigin Page Builder.
* **Site-aware LCP optimization** — Hero detection understands Elementor backgrounds, Divi, Bricks, WooCommerce product galleries, and WordPress core blocks.
* **Built-in performance audit** — Detects oversized images, third-party scripts, unused plugin CSS, and render-blocking resources — with actionable recommendations linked to settings.
* **Logged-in caching without duplicate pools** — One optimized guest HTML pool per URL. Logged-in visitors receive personalization on cache HIT (admin bar and user tokens restored live).
* **Modern React dashboard** — Clear modules for cache, optimization, asset unloading, preload, compatibility, performance audit, and tools. REST API–backed settings.
* **Modular by design** — Enable only what you need. Page cache, LCP/FCP optimizations, and asset unloading work independently.

= How it works =

Beky Cache Pilot detects your active page builder, scans for truly dynamic content, and only caches what is safe. You get full page cache, smart asset unloading, LCP/FCP optimization, and a built-in performance audit on standard WordPress hosting (Apache, nginx, or managed hosts).

= Full page cache =

* Static HTML cache with mobile and desktop variants
* Cache warming on publish
* Configurable cache lifetime and query-parameter exclusions
* Builder query vars excluded by default (Visual Composer, Beaver Builder previews, and more)
* Debug-friendly cache status for front-end requests

= Asset optimization =

* CSS minification and JavaScript defer
* Lazy loading and responsive image optimization (srcset/sizes)
* Third-party script delay (Google Analytics, GTM, Facebook, Hotjar, HubSpot, Clarity, and custom patterns)
* FCP / Speed Index optimization for render-blocking resources
* Critical resource preloading and resource hints
* TTFB link preload for LCP candidates

= Builder and e-commerce compatibility =

Beky Cache Pilot ships dedicated compatibility adapters for:

* Elementor (dynamic content scanner and safe cache policy)
* Divi Builder
* Bricks
* Beaver Builder and WP Bakery (standard builder adapter)
* WooCommerce (shop, product, cart, checkout, and account routes)

The compatibility tab in the dashboard shows detected builders and active adapters.

= Who is Beky Cache Pilot for? =

* **Agencies** — Deploy once across Elementor, Divi, Bricks, and WooCommerce sites.
* **Elementor users** — Cache static Elementor pages without breaking dynamic widgets.
* **WooCommerce stores** — Faster shop pages with a safe checkout.
* **Site owners who want a cautious rollout** — Safe Mode first. Speed second.
* **Developers** — REST API settings, WordPress filters throughout, and a modular PHP architecture.

== Installation ==

1. Upload the `beky-cache-pilot` folder to the `/wp-content/plugins/` directory, or install through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Beky → Cache Pilot** in the admin menu to open the dashboard.
4. Enable **Full page cache** on the Cache tab when you are ready.
5. Review the **Compatibility** tab to confirm your builder was detected.
6. Run a **Performance audit** to see recommended optimizations.

== Source Code ==

The React admin dashboard source is in `src/dashboard/`. Build with:

  npm install
  npm run build

Requires Node.js 18+. Uses @wordpress/scripts (webpack). Compiled assets are shipped in `assets/build/` for production installs.

== External services ==

= Beky API (api.beky.io) =

When the Beky Platform companion is active, the plugin may connect to `https://api.beky.io/api/v1` for license validation, settings sync, and plugin update checks. Data sent includes your site URL, plugin version, and license key (when you activate a license). Terms: https://beky.io/terms — Privacy: https://beky.io/privacy

= Beky storefront (beky.io) =

License purchase and account management links may open [beky.io](https://beky.io/). No data is sent until you visit those pages in your browser. Sales inquiries: sales@beky.io

= Stripe =

Subscription checkout and the customer billing portal (when licensed features use billing) are handled on Stripe-hosted pages. Billing is initiated only by a site administrator. Privacy: https://stripe.com/privacy — Terms: https://stripe.com/legal

= Third-party scripts (optional delay feature) =

When you enable third-party script delay, the plugin defers loading of scripts matching patterns you configure (defaults include Google Analytics, Google Tag Manager, Facebook, Hotjar, HubSpot, and Microsoft Clarity). Those services load in the visitor's browser per your site configuration; the plugin does not send visitor data to those providers from your server. See each provider's privacy policy for details.

== Frequently Asked Questions ==

= Will Beky Cache Pilot break my Elementor or Divi layouts? =

Beky Cache Pilot is designed for compatibility first. Safe Mode is enabled by default, and the plugin scans Elementor pages for dynamic widgets before deciding whether to cache. Editor, preview, and builder query requests are always bypassed.

= Does it work with WooCommerce cart and checkout? =

Yes. Cart, checkout, my account, and dynamic product listing queries bypass the cache automatically. WooCommerce mini-cart markup is neutralized in stored HTML so cached pages do not serve stale cart state.

= Do I need LiteSpeed or a specific host? =

No. Beky Cache Pilot works on shared hosting, nginx, Apache, Cloudways, Kinsta, and other common WordPress environments.

= Can I use page cache without aggressive asset optimization? =

Yes. Modules are independent. You can enable full page cache alone, or combine it with LCP optimization, asset unloading, and other features as needed.

= Does it cache logged-in users? =

Optionally. When enabled, logged-in visitors can receive cache HITs with live personalization (admin bar and user-specific tokens injected on serve) from a single guest HTML pool per URL.

= What page builders are supported? =

Elementor, Divi, Bricks, Beaver Builder, WP Bakery (Visual Composer), and SiteOrigin Page Builder, with WooCommerce compatibility for shop sites.

== Screenshots ==

1. Dashboard overview — cache status, asset optimization, Safe Mode, and detected builder at a glance.
2. Cache settings — full page cache, lifetime, warming, and exclusions.
3. Optimization settings — CSS, JS, images, LCP, FCP, and third-party script delay.
4. Asset unloading — smart presets for common plugins and page builders.
5. Performance audit — diagnostics with actionable recommendations.
6. Compatibility — builder detection and active adapters.

== Changelog ==

= 1.0.0 =
* Initial release: full page cache, asset optimization, conditional asset unloading, LCP/FCP optimization, performance audit, and builder compatibility layer.

== Upgrade Notice ==

= 1.0.0 =
Initial release of Beky Cache Pilot. Enable Safe Mode and review compatibility detection before turning on full page cache on production sites.
