=== ZiziCache ===
Contributors: zizicache
Tags: cache, performance, optimization, fonts, images, speed, web vitals, lazy loading, prefetch, preload
Requires at least: 6.1
Tested up to: 6.8
Requires PHP: 8.1
Stable tag: 0.5.7-beta.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Advanced WordPress caching and performance optimization plugin. Set It. Cache It. Done.

== Description ==

ZiziCache is a comprehensive WordPress performance optimization plugin that provides advanced caching, image optimization, font optimization, and Core Web Vitals improvements. Designed for both small websites and high-traffic enterprise sites.

**🚀 Key Features:**

* **Advanced Page Caching** - Static HTML caching with GZIP compression
* **Font Optimization** - Preload critical fonts, optimize Google Fonts, intelligent font detection, monitor font variants
* **Image Optimization** - Lazy loading, Priority Hints, LCP optimization, responsive preload
* **Video & iFrame Optimization** - YouTube/Vimeo placeholders, lazy loading
* **Speculative Loading** - Prefetch and prerender for faster navigation
* **Object Caching** - Redis integration for database query optimization
* **OPcache Management** - PHP bytecode cache optimization
* **Core Web Vitals** - LCP, CLS, and FID optimization
* **Security Features** - CSRF protection, path traversal prevention, secure file handling

**🎯 Performance Optimizations:**

* **Above the Fold Optimization** - Critical resource prioritization
* **Priority Hints** - Modern browser optimization with fetchpriority and importance attributes
* **Responsive Preload** - Smart preloading with imagesrcset and imagesizes
* **Automatic LCP Detection** - Layout Instability API integration for mobile/desktop optimization
* **Font Variant Monitoring** - Detect and warn about excessive font usage
* **JavaScript Optimization** - User interaction delay, minification

**🔧 Advanced Features:**

* **Modern Admin Interface** - Vue.js powered configuration panel
* **REST API Integration** - Programmatic cache management
* **CLI Support** - WP-CLI commands for cache operations
* **Enterprise Integrations** - WooCommerce, WPML, TranslatePress, Weglot compatibility
* **Hosting Provider Optimization** - SiteGround, specialized hosting configurations
* **Development Tools** - Debug mode, performance monitoring, detailed logging

**🛡️ Security & Reliability:**

* **Secure Cache Directory** - Automatic .htaccess protection
* **Input Validation** - All user inputs properly sanitized
* **Permission Checks** - Proper capability verification
* **Safe Uninstall** - Complete cleanup including .htaccess rules
* **Error Handling** - Graceful degradation on failures

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/zizi-cache/` directory
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Navigate to 'ZiziCache' in your WordPress admin menu
4. Configure caching and optimization settings
5. Enable desired optimization features

== Frequently Asked Questions ==

= What makes ZiziCache different from other caching plugins? =

ZiziCache combines traditional page caching with modern performance optimizations like Priority Hints, Speculative Loading, and automatic Core Web Vitals optimization. It's designed to work seamlessly with enterprise plugins and hosting providers.

= Does ZiziCache work with WooCommerce? =

Yes, ZiziCache includes specialized optimizations for WooCommerce, including proper cache exclusions for cart, checkout, and account pages.

= Can I use ZiziCache with CDN services? =

Yes, ZiziCache is designed to work with CDN services and includes specific optimizations for font delivery and asset optimization.

= Does ZiziCache support multilingual websites? =

Yes, ZiziCache includes integrations for WPML, TranslatePress, and Weglot translation plugins.

= How does font optimization work? =

ZiziCache automatically detects fonts used "above the fold", preloads critical fonts, optimizes Google Fonts delivery, and monitors for excessive font variants that could impact performance.

= What are Priority Hints and how do they help? =

Priority Hints are a modern browser feature that allows websites to tell browsers which resources are most important to load first. ZiziCache automatically applies these to critical images and fonts.

= Does ZiziCache work on shared hosting? =

Yes, ZiziCache is optimized for shared hosting environments and includes specific configurations for popular hosting providers.

== Screenshots ==

1. Main dashboard with cache statistics and performance overview
2. Font optimization settings with variant monitoring
3. Image optimization configuration with Priority Hints
4. Advanced settings with Speculative Loading options
5. Performance monitoring and Core Web Vitals tracking

== Changelog ==

= 0.5.7-beta.5 =
* IMPROVED: Added a button in the Optimization tab for saving settings in the Early Hints and Enhanced Navigation Strategies sections.
* FIX: Fixed a bug related to handling JavaScript in delay mode.


= 0.5.6-beta.5 =
* ENHANCED: Adjusted API calls for plugin license validation, minimizing requests to a single call to reduce database queries and external API endpoint load.


= 0.5.5-beta.5 =
* ENHANCED: Page cache preloader improved with advanced handling of expired cache – if expired, old cache is still served while URL is queued in SQLite preload.sqlite, worker calls URL with ?zizi_preload=1&zizi_warmed=1, OptiCore adds warmed footprint, new cache is stored with warmed marker, HTML comment is generated as <!-- ZiziCache. Cached at: $datetime warmed -->, ensuring end-to-end preload workflow and warmed cache identification.

= 0.5.4-beta.5 =
* UPDATE: Completely reworked image handling — full rewrite of the image conversion workflow and automatic registration of converted images into the Media Library when images are uploaded manually via FTP.
* FIX: Fixed logic in the Redis Object Cache integration when the plugin is deactivated and re-activated.
* FIX: Improved compatibility with WooCommerce.

= 0.5.3-beta.5 =
* FIX: Improved Redis connection handling for Unix domain sockets.
* FIX: Image Converter: improved conversion progress indicators and optimized image statistics.
* FIX: Improved compatibility with popular page builders.
* FIX: Removed visual LCP detector when working inside page builders in the admin.

= 0.5.2-beta.5 =
* NEW: HTTP 103 Early Hints support - Preload critical resources before HTML parsing for faster page loads with server-side resource hints
* NEW: Enhanced Navigation Strategies - Advanced Quicklink integration with intelligent prefetching and navigation optimization
* NEW: Theme compatibility improvements - Added support for Bricks Builder, Elementor, and popular theme frameworks
* ENHANCEMENT: Complete Image Converter statistics overhaul - Now uses filesystem scan as authoritative source for accurate WebP/AVIF counts
* ENHANCEMENT: Improved JavaScript core with better lifecycle management, font loading optimization, and enhanced lazy loading
* ENHANCEMENT: Vue.js admin interface improvements with consistent styling, loading indicators, and better user experience
* FIX: Redis object cache configuration - Resolved Unix socket detection and connection issues (REDIS_UNIX_SOCKET_FIX.md)
* FIX: Iframe lazy loading optimization - Fixed YouTube/Vimeo embed loading and performance issues
* FIX: Image Converter statistics accuracy - Fixed incorrect format counts that showed inverse of actual filesystem state
* FIX: Database cleanup for stale conversion records - Automatic removal of orphaned statistics entries

= 0.5.1-beta.5 =
* FIX: Fixed the Defer JavaScript Execution feature, where it was not possible to exclude specific JavaScript files according to user preferences.

= 0.5.0-beta.5 =
* NEW: Advanced Image Converter with AVIF-first approach - Automatically converts uploaded images to modern AVIF and WebP formats with up to 97% size reduction. Features intelligent fallback system, bulk processing, and comprehensive diagnostics.
* NEW: Added support for automatic deletion of original images after conversion, including async processing, safety checks (WooCommerce, featured, content), REST API endpoint, and bulk cleanup UI. Default behavior remains safe with originals preserved unless explicitly disabled.  
* NEW: Plugin now auto-registers images used in WooCommerce; associated images are deleted when the product is removed.
* ENHANCEMENT: Complete compatibility overhaul that resolves JavaScript conflicts preventing post/page saves. Features advanced lazy rendering, block-level cache management, and performance optimizations without editor interference.
* ENHANCEMENT: Improved plugin admin UI, adjustment of input state after settings update.
* FIX: Resolved critical Gutenberg editor compatibility issues that caused "Unable to save changes" errors when editing posts or pages.
* FIX: Eliminated JavaScript bundle duplicates that were inflating plugin size and causing potential memory issues.
* FIX: Optimized webpack configuration to prevent development files from appearing in production builds.
* FIX: JavaScript Bundle Optimization - Implemented conditional loading system that reduces initial admin page load by up to 573KB. ApexCharts and heavy components now load only when needed.

= 0.4.8-beta.4 =
* FIX: Fixed API endpoint in Fonts > Font Statistics > Generate CSS.

= 0.4.7-beta.4 =
* FIX: GZIP compression and headers unified according to the working version, always only .gz files and universal gzip header

= 0.4.6-beta.4 =
* FIX: Fixed WARMED cache detection logic in preloader system for improved accuracy
* FIX: Corrected cache lifespan conversion from hours to seconds in advanced-cache.php template
* FIX: Enhanced mobile cache support with proper user-agent detection and -mobile suffix variants
* NEW: Comprehensive OpenLiteSpeed (OLS) server compatibility implementation
* NEW: Advanced OLS server detection using LSWS_EDITION, SERVER_SOFTWARE, and environment variables
* NEW: OpenLiteSpeed-optimized headers for LSAPI compatibility and modgzip integration
* NEW: Enterprise vs OpenLiteSpeed differentiation with appropriate cache headers
* NEW: Local changelog integration for plugin details popup from readme.txt
* NEW: "View Changelog" and "Changelog" links in WordPress plugins page for licensed users
* ENHANCEMENT: Simplified and more reliable WARMED cache footprint detection using fopen/fread
* ENHANCEMENT: Improved serve-stale-while-revalidate functionality with SQLite queue processing
* ENHANCEMENT: Enhanced universal fallback support for non-OLS servers (Apache, Nginx)
* Other: Performance optimizations, comprehensive testing, and technical documentation improvements

= 0.4.1-beta.4 =
* FIX: Fixed potential XSS vulnerability in LCP detector (thanks to Vladimír Smitka)
* FIX: Fixed visibility of server-info API endpoint (thanks to Vladimír Smitka)
* REFACTOR: Complete overhaul of Font section and entire font optimization workflow
* REFACTOR: Complete rework of CSS processing using Sabberworm PHP CSS Parser
* NEW: Improved UI in Optimization section with individual save buttons for each category
* Other: Minor UI improvements, performance enhancements and security fixes

= 0.4.0-beta.4 =
* Added to the regular beta release update channel
* Fix API key from the plugin udater - api.zizicache.com proxy (security)
* Fixed insertion of HTML comments and scripts into JSON responses (does not break API)
* Fixed PHP warnings for undefined config keys
* Raised minimum required WordPress version to 6.1
* Other minor security and stability improvements

= 0.3.8-alpha.3 =
* **License Display**: Improved license information layout with compact vertical design
* **License Management**: Enhanced activation status text with clear usage indicators
* **Auto-Updater**: Fixed critical compatibility issues with LemonSqueezy updater system
* **Diagnostics**: Added updater status endpoint and diagnostic tools
* **UI/UX**: Better visual feedback for license activation limits and remaining slots

= 0.3.7-alpha.3 =
* **Font Intelligence**: Enhanced client-side font detection system for improved accuracy
* **Font Intelligence**: Added preload generation for critical fonts
* **Font Intelligence**: Admin interface with font usage statistics
* **Security Enhancement**: Added comprehensive security checks to uninstall.php
* **Security**: Added audit logging, path validation, and file type restrictions
* **Stability**: Improved error handling during plugin uninstall process

= 0.3.7-alpha.2 =
* **License Management**: Implemented Lemon Squeezy API integration for premium features
* **UI Enhancement**: New License management tab with activation/deactivation
* **Auto-Updater**: Secure premium plugin delivery system
* **Configuration**: Fixed cache_mobile configuration missing key issue

= 0.2.2 =
* **Video Optimization**: Complete YouTube and Vimeo placeholder support
* **Core Web Vitals**: Optimized for CLS prevention with aspect ratio preservation
* **Iframe Optimization**: Enhanced lazy loading with better type detection
* **Testing**: Automated Playwright tests for video optimizations
* **UI/UX**: Improved video player styling and accessibility

= 0.2.1 =
* **Priority Hints**: Implementation with importance attribute for images
* **Responsive Preload**: Added imagesrcset and imagesizes support
* **LCP Detection**: Automatic detection using Layout Instability API
* **Mobile Optimization**: Device-specific LCP element detection
* **API Integration**: New REST endpoints for LCP data collection

= 0.1.11 =
* **Font Optimization**: Major performance improvements for CSS processing
* **Memory Usage**: Reduced memory consumption with file size limits
* **Performance Monitoring**: Added execution time measurement and limits
* **Warning System**: Cached font warning overview with TTL management
* **Database Optimization**: Reduced queries with improved caching

= 0.1.10 =
* **Font Monitoring**: Enhanced detection of excessive font variants
* **Configuration**: New font optimization settings (ATF height, debug mode, cache TTL)
* **API Endpoints**: REST API for font warning management
* **Logging**: Unified logging system for font optimizations
* **UI Improvements**: Better font monitoring interface in admin

= 0.1.5 =
* **Font Processing**: Completely rewritten CSS processing engine
* **Caching System**: WordPress transient API integration for CSS content
* **Google Fonts**: Improved font name extraction and optimization
* **Diagnostics**: New testing methods for font optimization verification
* **Security**: Enhanced URL validation and CDN domain support

= 0.1.4 =
* **Speculative Loading**: Added prefetch/prerender with eagerness control
* **URL Exclusions**: Pattern-based exclusion system for speculation rules
* **Integration**: Full REST API and Vue.js admin integration
* **Performance**: No impact on existing plugin functionality

= 0.1.3 =
* **Admin Bar**: Fixed JavaScript loading and API communication
* **Security**: Fixed critical REST API permission vulnerabilities
* **Configuration**: Improved data passing to Vue.js application
* **Caching**: Unified URL exclusion configuration

= 0.1.2 =
* **Admin Bar**: Complete JavaScript and API integration overhaul
* **Vue Application**: Fixed REST API namespace and nonce handling
* **Security**: Implemented proper authentication for all endpoints
* **Licensing**: Removed temporary licensing system
* **Build System**: Improved Vite configuration for asset compilation

== Upgrade Notice ==

= 0.3.8-alpha.3 =
Critical fixes for license management and auto-updater compatibility. Resolves plugin management errors.

= 0.3.7-alpha.3 =
Important security update for plugin uninstall process. Recommended for all users.

= 0.3.7-alpha.2 =
Major update with premium license management. Backup your site before upgrading.

= 0.2.2 =
Significant video optimization improvements. Clear cache after update for best performance.

= 0.2.1 =
New Priority Hints and LCP optimization features. May require configuration review.

== Security ==

ZiziCache takes security seriously:

* All user inputs are properly validated and sanitized
* REST API endpoints require proper authentication
* Cache directories are protected with .htaccess files
* Secure uninstall process with comprehensive cleanup
* CSRF protection for all administrative actions
* Path traversal prevention for file operations

== Performance ==

ZiziCache is optimized for performance:

* Minimal overhead during page generation
* Efficient caching with GZIP compression
* Smart preloading and prefetching
* Redis object cache integration
* Font and image optimization
* Core Web Vitals optimization
* Enterprise-grade scalability

== Support ==

For support, documentation, and feature requests:

* Visit: https://zizicache.com
* Documentation: https://docs.zizicache.com
* GitHub: https://github.com/zizicache/zizi-cache

== License ==

This plugin is licensed under the GPL v2 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.