Release Notes:
- Smart Polling Intervals: Updated admin.js to dynamically adjust the polling interval in pollRestoreStatus based on the server's response time, reducing admin-ajax.php load during long restores.
- Resilient Rate Limiting: Improved check_rate_limit to handle rapid concurrent requests more gracefully by utilizing set_transient with a shorter expiration buffer.
- Database Size Caching: Modified get_total_database_size to force a cache refresh ($force_refresh = true) immediately after a "One-Click Optimization" to ensure the dashboard reflects accurate gains.
- Memory Management: Enhanced _backup_table_data_chunked to call gc_collect_cycles() more frequently during the export of large tables like wp_posts, preventing memory exhaustion errors.
- Regex Pattern Caching: Cached the compilation of exclude patterns in get_compiled_exclude_patterns to a static property, improving page load performance when "Server-Side Caching" is enabled.
- Fixed: Addressed an issue in clean_orphaned_postmeta where the DELETE query could time out on extremely large databases by implementing stricter LIMIT batching.
- Fixed: Corrected a logic error in is_safe_restore_query that occasionally flagged valid INSERT statements containing the word "DROP" within the content string as security risks.
- Fixed: get_trusted_host now correctly sanitizes the HTTP_HOST header to prevent potential cache poisoning when generating cache file paths.
- Fixed: Ensured restore_backup properly resets the optistate_maintenance_mode_active option if a fatal error occurs during the restoration process.
- Code Hardening: Applied stricter sanitize_text_field input validation in ajax_save_auto_settings to prevent non-numeric values from being saved for auto_optimize_days.