=== Solutiontech Optimización Web ===
Contributors: solutiontechcl
Tags: performance, cache, speed, optimization, core-web-vitals
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 2.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

High-performance WordPress optimization: HTML cache, CSS/JS defer, image WebP/AVIF, lazy load, speculation rules, and diagnostics.

== Description ==

Solutiontech Optimización Web is a modular, high-performance web optimization and Core Web Vitals acceleration suite for WordPress. It takes a conservative, safe-by-design approach: all performance features can be toggled independently, settings include a one-click rollback, and it never modifies wp-config.php, root .htaccess, or database tables from other plugins.

Main features:

* Full Spanish & English i18n support ready for translate.wordpress.org with unified textdomain.
* Font Awesome & Icon Stylesheet Async Loading: eliminate render-blocking CSS via rel="preload" and noscript fallback.
* Delay JS 1-Click Quick Presets: instant chips for Meta Pixel, Google Tag Manager, TikTok, Microsoft Clarity, Hotjar, and Chatbots.
* WordPress Site Health Integration: native performance, cache, and compression diagnostic tests in Tools ➔ Site Health.
* Direct Web Server Fast Rules: copy-ready snippets for Nginx and Apache (.htaccess) to serve cache in 2-5ms bypassing PHP/MySQL.
* Frontend Admin Bar Performance Debugger: live cache status (HIT Gzip/MISS), server TTFB, SQL query counter, and one-click cache purge.
* Real User Monitoring (RUM) Core Web Vitals: 100% local, privacy-friendly telemetry capturing real visitor LCP, INP, CLS, and TTFB.
* Dedicated Mobile Cache: separate static cache files for mobile devices (.mobile.html and .mobile.html.gz).
* Lazy Load Google Maps & External Iframes: defer heavy maps and audio players until scroll or click, saving 1 to 3 MB of blocking JavaScript.
* Advanced Database Maintenance: cleanup orphan postmeta, commentmeta, term relationships, transients, and defragment tables (OPTIMIZE TABLE).
* Lazy Load Comments & Gravatars: defer comment rendering and avatars until scroll or click, saving dozens of HTTP requests on posts.
* Auto-Detection of Third-Party Domains (Auto Resource Hints): scans HTML buffer and injects automated dns-prefetch and preconnect links.
* Smart Local Font Preloading (.woff2): preload key local fonts in the head to prevent FOIT layout shifts and accelerate FCP.
* Speculation Rules API (W3C / Chromium): native browser prerendering for instant 0ms internal page transitions.
* Safe HTML Minification: reduces DOM weight and cleans comments while preserving Schema JSON-LD and code blocks.
* High-Speed HTML Page Cache: static responses for guest visitors with automatic atomic purging on post/plugin updates.
* Static Gzip Pre-compression (.html.gz): serve pre-compressed pages directly with up to 85% bandwidth savings and zero CPU overhead.
* XML Sitemap Pre-warmer: crawls your sitemap.xml to automatically warm up cache files.
* Cloudflare API Integration: automatic edge cache purging via API v4 token.
* Google PageSpeed Insights API: run live mobile and desktop Core Web Vitals audits directly inside the dashboard.
* LCP Hero Image Auto-Optimization: strip lazy load from hero images, assign fetchpriority="high", and preload in the head.
* CSS Background Image Lazy Loading: load decorative backgrounds on demand via lightweight IntersectionObserver.
* Lightweight Video Embeds: replace heavy YouTube and Vimeo iframes with static thumbnails and SVG play buttons.
* Custom CDN (CNAME) Asset Rewriter: rewrite images, CSS, JS, fonts, and media URLs to your CDN hostname.
* Page Builder Compatibility: built-in presets and real-time cache bypassing for Elementor, Divi, Bricks, Breakdance, Oxygen, and form builders.
* Reverse Proxy Cache Purge: dispatch HTTP PURGE requests to Varnish and Nginx FastCGI.
* Local Google Fonts: download and host Google Fonts locally for full GDPR compliance.
* Bulk Image WebP/AVIF Optimizer: convert existing media library images in batches.
* Single-Level Settings Rollback & JSON Export/Import: safe recovery if any setting conflicts with custom theme code.

== Installation ==

= Automatic Installation =
1. Log in to your WordPress administration dashboard.
2. Navigate to Plugins ➔ Add New.
3. Click "Upload Plugin", select the solutiontech-optimizacion-web.zip file, and click "Install Now".
4. Activate the plugin through the "Plugins" menu in WordPress.
5. Go to Solutiontech ➔ Optimización Web in your admin sidebar to configure your settings.

= Manual Installation =
1. Download and extract the solutiontech-optimizacion-web directory.
2. Upload the solutiontech-optimizacion-web folder to your /wp-content/plugins/ directory via SFTP or file manager.
3. Activate the plugin through the "Plugins" menu in WordPress.

= Getting Started =
* Choose an Optimization Profile (Basic, Balanced, or Aggressive) in the General panel, or customize individual settings in Manual mode.
* Enable HTML Page Cache for instant static page loading.
* Use the one-click Delay JS presets (Meta Pixel, Google Tag Manager, TikTok, etc.) to postpone non-critical tracking scripts until user interaction.
* Run a live Google PageSpeed audit directly from the Diagnostics panel to measure your Core Web Vitals progress.

== Frequently Asked Questions ==

= Does this plugin modify my wp-config.php or .htaccess files? =
No. By default, Solutiontech Optimización Web uses a conservative, safe-by-design architecture that runs through WordPress standard hooks and file storage in wp-content/cache/. It does not touch your wp-config.php or root .htaccess automatically. If you want direct server-level cache delivery (2-5ms TTFB), copy-paste rules for Nginx and Apache are provided in the Cache panel for you to add voluntarily.

= Is this plugin compatible with WooCommerce? =
Yes. It includes a dedicated WooCommerce optimization module that allows you to disable Cart Fragments on non-shop pages and dequeue the cart password strength meter where not needed, significantly accelerating checkout and product pages.

= Is it compatible with page builders like Elementor, Divi, or Bricks? =
Yes. The plugin includes 1-click builder presets and automatic builder detection. It automatically disables caching and HTML minification while you are editing inside Elementor, Divi, Bricks, Oxygen, or Breakdance to ensure zero editing friction.

= Does this plugin comply with GDPR / RGPD privacy laws? =
Yes. The Local Google Fonts module allows you to self-host webfonts on your own WordPress server, eliminating direct IP sharing with Google servers. Furthermore, the built-in Core Web Vitals RUM telemetry is 100% local and stores zero cookies, IP addresses, or personal identifiable information (PII).

= What happens if I deactivate or uninstall the plugin? =
On deactivation, all background WP-Cron tasks are immediately cleared and static cache files are purged. On uninstallation (via the WordPress admin delete action), all plugin settings, cached assets, transients, and telemetry data are completely wiped, leaving your database and filesystem clean.

== External Services ==

This plugin optionally connects to the following third-party services to provide advanced optimization and diagnostic features. None of these services are called without your explicit configuration or action:

1. Cloudflare API (Optional)
* Purpose: Allows automatic and manual purging of your Cloudflare CDN edge cache whenever content is published or updated on your site.
* Data transmitted: Only your Cloudflare Zone ID and API Token are sent in authenticated HTTP headers to verify permissions. No visitor or personal data is ever transmitted.
* When is it called: Only when you configure a Cloudflare API Token in the Advanced panel and either click "Purge Cloudflare" or update a post.
* Provider: Cloudflare, Inc.
* Terms of Service: https://www.cloudflare.com/terms/
* Privacy Policy: https://www.cloudflare.com/privacypolicy/

2. Google PageSpeed Insights API (Optional)
* Purpose: Runs real-time Core Web Vitals audits (LCP, CLS, INP, FCP) directly from your WordPress admin dashboard to evaluate site performance.
* Data transmitted: The public URL of your website to be analyzed and an optional Google API key. No personal visitor data or WordPress user data is transmitted.
* When is it called: Only when an administrator clicks "Run PageSpeed Audit" in the Diagnostics tab.
* Provider: Google LLC
* Terms of Service: https://policies.google.com/terms
* Privacy Policy: https://policies.google.com/privacy

3. Google Fonts API & CDN (Optional)
* Purpose: When "Local Google Fonts" is enabled, the plugin downloads requested Google Web Fonts (.woff2 files) and their CSS to store and serve them directly from your local WordPress server for GDPR compliance and faster loading.
* Data transmitted: Standard HTTP GET request fetching public stylesheet and font files. No personal visitor data is transmitted.
* When is it called: Only once when saving settings with Google Fonts URLs configured, or when visiting pages with configured fonts until assets are cached locally.
* Provider: Google LLC
* Terms of Service: https://policies.google.com/terms
* Privacy Policy: https://policies.google.com/privacy

== Changelog ==

= 2.3.0 =
* Added Font Awesome & Icon Stylesheets Asynchronous Loading (rel="preload" as="style" with noscript fallback) to eliminate render blocking in PageSpeed.
* Added 1-Click Quick Presets for Delay JS (Meta Pixel, Google Tag Manager, TikTok, Microsoft Clarity, Hotjar, and Chatbots).
* Full Spanish & English translation support ready for translate.wordpress.org with unified textdomain.

= 2.2.0 =
* Added WordPress Site Health integration (Tools ➔ Site Health) with automated performance tests for page cache, Gzip compression, and modern image formats (WebP/AVIF).
* Added Direct Web Server Fast Rules for Nginx and Apache (.htaccess) in the Cache panel for 2-5ms static serving bypassing PHP and MySQL.

= 2.1.0 =
* Added Dedicated Mobile Cache: generates and serves independent static files for mobile devices (.mobile.html and .mobile.html.gz).
* Added Real User Monitoring (RUM) Core Web Vitals telemetry: 100% local and private measurement of LCP, INP, CLS, and TTFB via PerformanceObserver and Beacon API.
* Added interactive RUM telemetry dashboard in the Diagnostics panel with reset controls.

= 2.0.0 =
* Major release: Advanced Database Maintenance and Table Defragmentation (OPTIMIZE TABLE, orphan postmeta, commentmeta, term relationships, and transient sweep).
* Added Lazy Load for Google Maps and Third-Party Iframes with scroll (IntersectionObserver) or interactive click preview cards.
* Complete WordPress.org Plugin Check standard compliance (0 errors, 0 warnings).

= 1.9.0 =
* Added Frontend Admin Bar Performance Debugger with real-time cache status (HIT Gzip/MISS), server TTFB, SQL query counter, and one-click cache purge.
* Added Lazy Load Comments and Gravatars module with on-demand loading via scroll (IntersectionObserver) or click button.
* Full WordPress.org Plugin Check standard compliance (0 errors, 0 warnings).
* Unified official plugin text domain to solutiontech-optimizacion-web.

= 1.8.0 =
* Added Auto-Detection of Third-Party Domains (Auto Resource Hints) for automated dns-prefetch and preconnect headers.
* Added Smart Local Font Preloading (.woff2) in the head for Google Fonts and custom fonts.

= 1.7.0 =
* Added W3C / Chrome Speculation Rules API for instant 0ms internal page navigation.
* Added Safe HTML Minification with JSON-LD Schema and code block preservation.

= 1.6.1 =
* Published stylized README.md documentation with dynamic shields, index, and architecture walkthrough.
* Minor CSS and layout responsive refinements.

= 1.6.0 =
* Lavado de imagen integral adoptando el sistema de diseño oficial de Solutiontech (paleta Azul Navy `#223c6a` y Naranja `#ef9618`).
* Rediseño y ampliación del Widget de Escritorio en wp-admin con medidor circular SVG de porcentaje de optimización y accesos directos.
* Creación de la plantilla oficial de traducción `.pot` (375+ cadenas) y catálogo de assets para WordPress.org (.wordpress-org).

= 1.5.0 =
* Rebranding a Solutiontech Optimización Web por Solutiontechcl.
* Añadido módulo de Alojamiento Local de Google Analytics y Tag Manager con reescritura automática y cron diario.
* Añadido soporte para pre-compresión estática Gzip (.html.gz) en archivos de caché con entrega ultra rápida.
* Añadido Lazy Load de imágenes de fondo CSS (background-image) con IntersectionObserver para maquetadores.
* Añadido optimizador automático de Imagen LCP con asignación nativa de fetchpriority="high" y precarga en head.
* Añadida sustitución ligera de videos de YouTube y Vimeo por miniaturas responsivas con reproducción bajo demanda (ahorro de 1.2+ MB por video).
* Añadido módulo de CSS Crítico (Critical CSS inline) y carga asíncrona de hojas de estilo para eliminar el bloqueo de renderizado en PageSpeed.
* Añadido módulo de Reescritura a CDN personalizada (CNAME) para servir medios y archivos estáticos desde una URL propia o zona pull.
* Añadido módulo de Compatibilidad inteligente con Maquetadores (Elementor, Divi, Bricks, Oxygen, Breakdance, Beaver Builder) con exclusiones en 1 clic.
* Añadido probador en vivo de Google PageSpeed Insights API con métricas Core Web Vitals (LCP, CLS, TBT, FCP) y puntuaciones completas.
* Añadido soporte de purga HTTP PURGE para servidores web y proxies inversos (Varnish / Nginx FastCGI Cache).
* Añadido módulo de Integración con Cloudflare API para purga automática y manual de la caché perimetral.
* Añadido módulo de Fuentes de Google Locales para descargar y servir fuentes localmente (RGPD + Rendimiento).
* Añadido Optimizador Masivo de Imágenes para procesar por lotes imágenes existentes a formatos WebP/AVIF.
* Añadido Precalentador de Caché (Preloader) con detección automática de Sitemap XML.
* Añadida Limpieza Automática Programada de Base de Datos vía WP-Cron.
* Añadida funcionalidad de Exportar e Importar configuración en formato JSON.
* Añadido Widget de Escritorio en wp-admin para estadísticas y vaciado rápido de caché.
* Rediseñado el panel con navegación lateral agrupada en General, Rendimiento, WordPress y Avanzado.
* El menú lateral permanece visible en escritorio y se convierte en un panel desplegable en pantallas pequeñas.
* La navegación recuerda la última sección abierta durante la sesión y actualiza el hash de la URL.
* Mejorada la accesibilidad de navegación con estado aria-current y control aria-expanded en móvil.
* El botón Guardar cambios continúa visible mediante una barra sticky dentro del área de contenido.
* Ajustados espaciados, ancho útil y responsive para evitar pestañas cortadas u opciones fuera de vista.
* Revisión de compatibilidad del refresco AJAX y del dashboard tras el cambio de estructura.

= 1.3.0 =
* Corregido el dashboard para actualizar puntuación, estados, caché y contadores inmediatamente tras acciones AJAX, sin recargar la página.
* El rollback actualiza también controles y estadísticas sin recarga.
* Corregido el estado de los botones de limpieza después de procesar hasta 500 elementos.
* Añadido Delay JavaScript selectivo con interacción del usuario y timeout de seguridad.
* Delay JS solo actúa sobre visitantes no autenticados, objetivos explícitos y scripts elegibles.
* Añadido Administrador de recursos CSS/JS por página con reglas handle + ruta/patrón y editor moderno de reglas.
* Añadidas protecciones para no forzar la descarga de dependencias encoladas.
* Añadido módulo WooCommerce con optimización opcional de Cart Fragments y medidor de contraseña.
* Añadidas tarjetas de estado para Administrador de recursos y WooCommerce.
* Actualizado el perfil Agresivo para incluir Delay JS selectivo; las reglas de recursos y WooCommerce nunca se activan automáticamente por perfiles.
* Nueva revisión de sintaxis, flujo AJAX y seguridad.

= 1.2.0 =
* Añadido selector de perfiles Manual, Básico, Equilibrado y Agresivo.
* Los perfiles preparan los ajustes antes de guardar y son reversibles.
* Los cambios en opciones controladas por el perfil cambian automáticamente el estado a Manual.
* “Gracias por crear con WordPress” se oculta por defecto usando admin_footer_text, con interruptor para restaurarlo.

= 1.1.0 =
* Añadidos módulos CSS/JavaScript, imágenes, fuentes, resource hints, preload y prefetch.
* Minificación conservadora de CSS y defer mediante WordPress.
* Añadidos WebP/AVIF, calidad, lazy load y diagnóstico de formatos.

= 1.0.0 =
* Primera versión productiva.
* Panel moderno y responsive.
* Caché HTML, optimizaciones básicas de WordPress, limpieza de base de datos y diagnóstico.
