=== RavenCache: Page Cache & Speed ===
Contributors: deskraven
Tags: cache, page cache, performance, speed, cloudflare
Requires at least: 5.9
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

Fast page cache with HTML/CSS/JS optimization, WebP, local fonts, Cloudflare and Bunny.net purge, database cleanup and speed reports.

== Description ==

RavenCache makes a WordPress site faster without a maze of settings. Pick a profile (Safe, Balanced or Aggressive) and the plugin switches on a matching set of optimizations. Every option can then be changed on its own, and the dashboard shows what is on and how risky each option is.

**Page cache**

* Static HTML cache served before WordPress loads (a drop-in `advanced-cache.php`), with automatic purge when content changes.
* Never caches logged-in users, carts, checkout, search results or pages that set cookies; when in doubt it skips the cache instead of risking showing someone else's data.
* Optional cache warm-up (preload) from the sitemap.
* `X-RavenCache` response header (HIT / MISS / BYPASS with the reason) to find out why a page is not cached.

**Optimization**

* HTML minification, safe script deferring, delaying of third-party scripts (analytics, pixels, chat) until the first interaction.
* Lazy-loading of images and iframes, YouTube facade, WebP conversion, `font-display: swap`, local copies of Google Fonts.
* Removal of unneeded extras (emoji script, embeds, feed links, pingbacks), Heartbeat control, revision limit.
* Gzip and long-lived browser caching rules for static files (Apache and LiteSpeed `.htaccess`, checked after saving and rolled back on a server error).

**CDN and edge**

* Cloudflare: purge, recommended zone settings and Cache Rules for HTML caching, with your own API token.
* Bunny.net Pull Zone purge, generic HTTP PURGE for Varnish or Nginx, static-file URL rewriting to a CDN host.

**Database**

* Cleanup of old revisions, auto-drafts, spam and trashed comments, expired transients, orphaned metadata and trashed posts, on demand or on a schedule.
* Report of the largest autoloaded options.

**Measurements and charts**

* One click measures the response time of the home page and a few other pages (first request, cached, and cache-bypassed) and analyses what blocks the first render.
* Optional Google PageSpeed (Lighthouse) test for mobile and desktop.
* History and charts on the dashboard, plus a configuration report you can paste into a support request.

Currently the plugin interface is in Polish.

== External services ==

RavenCache connects to external services only when you switch the related feature on or click the related button. Nothing is sent in the background.

= Google PageSpeed Insights API =
Used by the "Google PageSpeed test" buttons on the dashboard. The address of your home page (and your optional API key from the Advanced tab) is sent to Google to run the test, and the result is stored in your database.
Service: https://developers.google.com/speed/docs/insights/v5/about
Terms: https://developers.google.com/terms
Privacy: https://business.safety.google/privacy/

= Cloudflare API =
Used only when you enter an API token in the Cloudflare tab. The plugin sends purge requests, zone settings and Cache Rules requests for your zone to api.cloudflare.com.
Terms: https://www.cloudflare.com/website-terms/
Privacy: https://www.cloudflare.com/privacypolicy/

= Bunny.net API =
Used only when you enter a Bunny.net API key. The plugin sends Pull Zone purge requests to api.bunny.net.
Terms: https://bunny.net/tos/
Privacy: https://bunny.net/privacy/

= Google Fonts =
If you turn on "local Google Fonts", the plugin downloads the font files referenced by your theme from fonts.googleapis.com and fonts.gstatic.com once, stores them on your server, and serves them from there afterwards. Visitors do not contact Google.
Terms: https://developers.google.com/fonts/terms
Privacy: https://developers.google.com/fonts/faq/privacy

= YouTube thumbnails =
If you turn on the YouTube facade, visitors' browsers load a preview image from i.ytimg.com until they click play; the video itself loads from youtube-nocookie.com only after the click.
Terms: https://www.youtube.com/t/terms
Privacy: https://business.safety.google/privacy/

= Your own proxy =
If you configure an HTTP PURGE address (Varnish, Nginx), purge requests are sent to that address.

== Installation ==

1. Upload the `ravencache` folder to `/wp-content/plugins/`, or install the plugin from the Plugins screen.
2. Activate it. A starter profile ("Safe") is applied on first activation.
3. Open **RavenCache** in the admin menu, check the "Environment diagnostics" table on the dashboard, and use "Measure page speed" to get a baseline.
4. Move to the Balanced profile when you are comfortable, and test the site as a logged-out visitor.

Another page-cache plugin must not be active at the same time. RavenCache warns about conflicts and never overwrites another plugin's `advanced-cache.php`.

== Frequently Asked Questions ==

= Does it work with WooCommerce? =
Yes. Cart, checkout and account pages, and visitors with cart cookies, are never served from the cache.

= Will it break my site? =
The "Safe" profile only enables options that almost never cause problems. Riskier options are marked, can be switched off one by one, and you can add exceptions. Add `?nospeed=1` to any address to view it with all optimizations off.

= What does the plugin write to disk? =
Cached pages in `wp-content/cache/ravencache`, the drop-in `wp-content/advanced-cache.php`, the `WP_CACHE` constant in `wp-config.php`, and (optionally) a marked block in `.htaccess`. All of it is removed on deactivation or uninstall.

= Is there a Pro version? =
A paid version with extra features is planned. Settings carry over because they are stored in the same options.

== Changelog ==

= 1.0.0 =
* First release on WordPress.org.

== Upgrade Notice ==

= 1.0.0 =
First release.
