=== Eco-Shield === Contributors: ssebuwufumoses, hanifahnabayinda Tags: performance, youtube, privacy, webp, accessibility, gdpr Requires at least: 6.5 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Boost PageSpeed, ensure GDPR compliance, and reduce carbon footprint by replacing YouTube & Vimeo embeds with locally hosted WebP facades. == Description == **Eco-Shield** is the lightweight, "set-it-and-forget-it" solution for faster, greener, and more private WordPress sites. Standard YouTube and Vimeo embeds can destroy your PageSpeed scores. A single video embed often loads over 1.7MB of JavaScript and tracks your users before they even click play. **Eco-Shield fixes this automatically.** It replaces heavy external embeds with a **locally hosted, optimized WebP image**. The heavy video player (and its tracking cookies) is only loaded when your visitor explicitly clicks "Play." ### 🌟 New in Version 1.1.0 * **WebP Engine:** Automatically converts video thumbnails to ultra-small WebP format. * **Local Caching:** Images are hosted on your server—no 3rd party requests on load! * **Accessibility Ready:** Full keyboard navigation support and WCAG AA compliant colors. * **Admin Tools:** New "Purge Cache" button in the Admin Toolbar. ### 🛡️ Comprehensive Protection Eco-Shield automatically detects and optimizes: * **Gutenberg Blocks:** Core YouTube and Vimeo blocks. * **Auto-Embeds (oEmbed):** Plain URLs pasted into the editor. * **Legacy Iframes:** Hard-coded iframes from YouTube and Vimeo. * **RSS Feeds:** Automatically disables itself for RSS/Email feeds so newsletters don't break. ### ⚡ Why use Eco-Shield? * **🚀 Instant Speed Boost:** Drastically reduces page size (WebP images are often <20kb). * **🌱 Eco-Friendly:** Reduces data transfer and server energy usage. * **🔒 Privacy First (GDPR/DSGVO):** Zero cookies and Zero 3rd-party connections on initial load. * **♿ Accessible:** Built with screen readers and keyboard navigation in mind. * **⚡ Zero Configuration:** No confusing settings. Just activate it. == Installation == 1. Upload the `eco-shield.zip` file to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. **That's it!** Old and new videos are automatically protected. == Frequently Asked Questions == = How do I clear the thumbnail cache? = We added a new button to your top Admin Bar: **"Purge Eco-Shield"**. Clicking this will: 1. Delete all local WebP/JPG files. 2. Automatically trigger WP Rocket, LiteSpeed, or Autoptimize to clear their page cache. = Where are the images stored? = Images are stored locally in your uploads folder under `/eco-shield-thumbs/`. This ensures your site doesn't rely on external servers (YouTube/Vimeo) to load images, which is great for Privacy and SEO. = Is it compatible with RSS Emails? = Yes! Version 1.1.0 automatically detects if the content is being viewed in an RSS Feed or Email Newsletter and disables the protection. This ensures your subscribers see a working video link instead of a broken script. = Is it compatible with caching plugins? = Yes. Fully compatible with WP Rocket, LiteSpeed, W3 Total Cache, and Autoptimize. == Screenshots == 1. The Smart Facade: A locally hosted WebP thumbnail looks exactly like the real player. 2. Admin Toolbar: The new "Purge Eco-Shield" button for easy management. 3. Success Notification: The accessible, centered toast notification when clearing cache. 4. Performance Boost: Before and After PageSpeed comparison. == Changelog == = 1.1.0 = * **New:** Local Thumbnail Caching (100% GDPR Compliance). * **New:** Automatic WebP Conversion Engine (Reduced image sizes by ~60%). * **New:** Admin Bar "Purge Cache" Button with modern SVG icon. * **New:** Added Accessibility support (Keyboard navigation + WCAG AA contrast colors). * **New:** Frontend Success Notifications (Toast message) when purging cache. * **New:** Added `uninstall.php` to clean up all files upon deletion. * **Fix:** Added RSS/Feed detection to prevent broken videos in Email Newsletters. * **Security:** Added directory browsing protection (`index.php`) to the cache folder. * **Compatibility:** Added auto-purge hooks for WP Rocket, LiteSpeed, and Autoptimize. = 1.0.1 = * Fix: Enable backend video previews for the block editor. = 1.0.0 = * Initial release. * Added core "Smart Facade" engine for YouTube and Vimeo. * Implemented lazy loading for privacy and performance.