=== Wonyx Speed Optimizer ===
Contributors: digitalkiaus
Tags: cache, performance, webp, speed, optimization
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Improve WordPress speed with page caching, WebP images, HTML minification, JavaScript defer, preload controls and optional server rules.

== Description ==

Wonyx Speed Optimizer is a lightweight WordPress performance plugin that provides practical caching, image and front-end optimization controls without requiring an external optimization service.

The plugin focuses on common performance tasks that can be managed from WordPress: caching eligible public HTML responses, generating WebP image sidecars, minifying cached HTML, deferring eligible JavaScript through WordPress script strategies, preloading a configured hero image, and warming a small set of local pages after cache purges.

= Performance Features =

* **Page caching:** Stores eligible public HTML responses in the WordPress content cache directory and serves warm cached pages on later requests.
* **HTML minification:** Reduces safe whitespace in cached HTML output.
* **JavaScript defer:** Uses the WordPress script strategy API for eligible front-end scripts while skipping handles with inline before/after code.
* **LCP image preload:** Lets an administrator specify an exact above-the-fold image URL to preload.
* **WebP generation:** Creates WebP sidecar files for supported JPEG and PNG files while preserving the original media files.
* **Bulk image optimization:** Processes existing media in small scheduled batches and reports conversion results.
* **Cache preload:** Makes small background requests to the same WordPress site to warm the homepage and a limited number of recently modified public pages.
* **Optional Apache/LiteSpeed rules:** When explicitly enabled by an administrator, the plugin can add its own marked `.htaccess` rules for browser caching, compression and WebP rewriting.

= Privacy and External Services =

Wonyx Speed Optimizer does not include advertising, telemetry or third-party analytics and does not require an external account for its core features.

The cache preload feature sends HTTP requests only to URLs on the same WordPress site's host. It does not send site data to Wonyx IT Solutions or another external optimization service.

= Compatibility Notes =

Performance behavior varies by hosting stack, theme and installed plugins. After enabling optimization options, test important public pages and interactive features such as navigation, forms, account areas, carts and checkout flows. Avoid running overlapping page-cache or HTML optimization features in multiple performance plugins at the same time.

The optional `.htaccess` rules are intended for compatible single-site Apache and LiteSpeed environments. They are disabled by default, are not installed automatically on activation, and are not enabled on WordPress multisite networks.

== Installation ==

1. Install the plugin from **Plugins > Add New**, or upload the plugin ZIP through **Plugins > Add New > Upload Plugin**.
2. Activate **Wonyx Speed Optimizer**.
3. Open **Wonyx Speed** in the WordPress admin menu.
4. Review the settings and explicitly enable only the optimizations appropriate for the site. Potentially compatibility-sensitive front-end, image, preload and server-rule features are disabled by default.
5. Save the settings, clear the page cache, and test key front-end pages.
6. Enable the optional Apache/LiteSpeed server rules only when the site uses a compatible server and WordPress can safely update `.htaccess`.

== Frequently Asked Questions ==

= What does Wonyx Speed Optimizer do? =

It provides WordPress page caching, cached HTML minification, JavaScript defer, LCP image preload controls, WebP generation, cache preloading and optional Apache/LiteSpeed rules.

= Can it improve WordPress page speed? =

The plugin is designed to reduce common front-end and page-delivery overhead. Actual PageSpeed Insights and Core Web Vitals results depend on the theme, plugins, hosting, page content, third-party resources and server configuration.

= How does the page cache work? =

Eligible public GET responses are stored as HTML files under the WordPress content cache directory. Logged-in sessions, previews, password-protected posts, common WooCommerce cart/account pages and other unsuitable requests are excluded.

= Does the plugin modify wp-config.php or install advanced-cache.php? =

No. This version does not modify `wp-config.php` and does not install or replace an `advanced-cache.php` drop-in.

= Does the plugin change .htaccess automatically when activated? =

No. Optional Apache/LiteSpeed rules are disabled by default. The plugin adds its own marked `.htaccess` section only after an administrator explicitly enables the server-rules option and saves the settings.

= What happens to existing .htaccess content? =

The plugin uses WordPress marker functions for its own section and does not intentionally replace unrelated rules. Disabling the option or deactivating the plugin removes the Wonyx marker section.

= Does the plugin generate WebP images? =

Yes. When supported by the server's WordPress image editor, the plugin can create `.wso.webp` sidecar files for JPEG and PNG media variants. Original media files are preserved.

= Are WebP files always kept? =

No. A generated WebP sidecar is kept only when it is valid and smaller than the corresponding source image.

= Does JavaScript defer rewrite scripts manually? =

No. The defer feature uses WordPress script strategy data for eligible enqueued script handles. It does not load plugin JavaScript from a third-party CDN.

= Can I preload a hero or LCP image? =

Yes. You can enter the exact image URL used above the fold. Use this selectively because unnecessary preloads can compete with more important requests.

= Does cache preload contact an external service? =

No. The preload worker requests only same-host URLs from the WordPress site, such as the homepage and a few recently modified public pages.

= Does the plugin collect analytics or telemetry? =

No. Wonyx Speed Optimizer does not include usage tracking, advertising telemetry or automatic data reporting to Wonyx IT Solutions.

= What should I test after enabling optimization? =

Test navigation, forms, search, logged-out public pages, account areas, carts, checkout flows, popups and other interactive features used by the site. Clear the cache after changing optimization settings.

= What happens when the plugin is uninstalled? =

The plugin removes its WordPress options, scheduled events, plugin-managed cache directory and marked `.htaccess` rules. Generated `.wso.webp` media sidecars are preserved to avoid deleting potentially referenced media derivatives during uninstall.

== Changelog ==

= 2.2.1 =
* Removed the small CSS inlining feature so the plugin no longer generates front-end `<style>` tags during HTML rewriting.
* Kept front-end JavaScript optimization on WordPress script strategy APIs.
* Moved remaining admin presentation styles to the enqueued admin stylesheet and updated progress rendering through the enqueued admin script.
* Updated settings and documentation to match the revised WordPress.org review build.

= 2.2.0 =
* Prepared the plugin for WordPress.org directory review.
* Removed manual tracking-script rewriting and kept JavaScript optimization on WordPress script APIs.
* Made Apache/LiteSpeed `.htaccess` changes explicitly opt-in instead of applying them on activation.
* Improved request sanitization, same-host preload validation and filesystem handling.
* Added uninstall cleanup for plugin cache files and managed server rules.
* Improved WebP rewrite rules and documentation consistency.
* Expanded English-language installation, privacy, compatibility and FAQ documentation.

= 2.1.0 =
* Redesigned the admin interface while keeping the lightweight optimization core.
* Improved WebP batch reporting and rebuild controls.
* Added clearer page-cache and WebP engine health checks.
