Changeset 3168601
- Timestamp:
- 10/14/2024 01:25:06 PM (18 months ago)
- Location:
- a2-optimized-wp/trunk
- Files:
-
- 5 edited
-
a2-optimized.php (modified) (3 diffs)
-
app/models/admin/class-admin-settings.php (modified) (2 diffs)
-
core/A2_Optimized_Benchmark.php (modified) (3 diffs)
-
core/A2_Optimized_SiteHealth.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a2-optimized-wp/trunk/a2-optimized.php
r3110676 r3168601 10 10 * Plugin Name: A2 Optimized WP 11 11 * Plugin URI: https://wordpress.org/plugins/a2-optimized/ 12 * Version: 3.0. 912 * Version: 3.0.10 13 13 * Author: A2 Hosting 14 14 * Author URI: https://www.a2hosting.com/ … … 25 25 26 26 define( 'A2OPT_VERSION', '3.0' ); 27 define( 'A2OPT_FULL_VERSION', '3.0. 9' );27 define( 'A2OPT_FULL_VERSION', '3.0.10' ); 28 28 define( 'A2OPT_MIN_PHP', '5.6' ); 29 29 define( 'A2OPT_MIN_WP', '5.1' ); … … 101 101 if (is_admin()) { 102 102 new A2_Optimized_SiteHealth; 103 104 $benchmarks = new A2_Optimized_Benchmarks; 105 $benchmarks->prune_benchmarks('backend', 10); 106 $benchmarks->prune_benchmarks('frontend', 5); 107 103 108 if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) { 104 109 add_action('admin_menu', ['A2_Optimized_Optimizations', 'addLockedEditor'], 100, 100); 105 110 } 111 106 112 if (in_array('easy-hide-login/wp-hide-login.php', apply_filters('active_plugins', get_option('active_plugins')))) { 107 113 add_filter( 'admin_email_check_interval', '__return_false' ); -
a2-optimized-wp/trunk/app/models/admin/class-admin-settings.php
r3110676 r3168601 56 56 if ( !wp_verify_nonce($_POST['nonce'], 'a2opt_ajax_nonce') || !current_user_can('manage_options') ) { 57 57 echo json_encode(['result' => 'fail', 'status' => 'Permission Denied']); 58 wp_die(); 59 } 60 61 if (!isset($_POST['a2_page']) || !isset($_POST['target_url']) || !isset($_POST['run_checks'])) { 62 echo json_encode(['result' => 'fail', 'status' => 'No page specified']); 58 63 wp_die(); 59 64 } … … 505 510 'display_text' => 'Web Performance', 506 511 'metric_text' => "How does your hosting <strong>compare</strong> to A2 Hosting's best plans? With the graphs below <strong>LOWER IS BETTER</strong>.", 507 'legend_text' => "Overall WordPress Execution Time",512 'legend_text' => 'Overall WordPress Execution Time', 508 513 'explanation' => 'The web performance score measures how your current host performs compared to A2 Hosting. This web performance score looks at server speed and other metrics to determine how fast your website will load, based on which hosting company & plan you host your website with. <br /><br /> 509 514 The lower the score on the graph the faster your website will load. Not all hosting companies and plans use the same hardware. A2 Hosting uses the best server hardware on the market, focusing on speed & security. A2 Hosting also offers free site migration to help you move your existing websites to them.<br /><br /> -
a2-optimized-wp/trunk/core/A2_Optimized_Benchmark.php
r2954507 r3168601 69 69 $existing_results[date('Y-m-d H:i:s')] = $results; 70 70 71 update_option('a2opt-benchmarks-hosting', $existing_results); 71 update_option('a2opt-benchmarks-hosting', $existing_results, false); 72 $this->prune_benchmarks('backend', 10); 72 73 73 74 return [ … … 239 240 240 241 if ($benchmarks_type == 'frontend') { 241 update_option('a2opt-benchmarks-frontend', $benchmarks );242 update_option('a2opt-benchmarks-frontend', $benchmarks, false); 242 243 } elseif ($benchmarks_type == 'backend') { 243 update_option('a2opt-benchmarks-hosting', $benchmarks );244 update_option('a2opt-benchmarks-hosting', $benchmarks, false); 244 245 } 245 246 } … … 494 495 'scores' => $this->filter_lighthouse_data($lighthouse_data) 495 496 ]; 496 update_option($option_key, $existing_results); 497 update_option($option_key, $existing_results, false); 498 499 $this->prune_benchmarks('frontend', 5); 497 500 498 501 $output = [ -
a2-optimized-wp/trunk/core/A2_Optimized_SiteHealth.php
r2999241 r3168601 229 229 'post_mime_type' => 'image', 230 230 'post_status' => 'inherit', 231 'posts_per_page' => -1, 231 'posts_per_page' => 500, 232 'meta_query' => [ 233 [ 234 'key' => '_wp_attachment_metadata', // Meta key for image metadata. 235 'value' => 'full', // Search for 'full' size images in the metadata. 236 'compare' => 'LIKE' 237 ], 238 ] 232 239 ]; 233 240 … … 245 252 if ($large_image_count > 3) { 246 253 $result['status'] = 'recommended'; 247 $result['label'] = ( $large_image_count . 'large images found in media library' );254 $result['label'] = ( 'Several large images found in media library' ); 248 255 $result['description'] = sprintf( 249 256 '<p>%s</p>', -
a2-optimized-wp/trunk/readme.txt
r3110676 r3168601 1 1 === A2 Optimized WP - Turbocharge and secure your WordPress site === 2 2 Contributors: a2hosting, supersoju 3 Tags: a2 hosting, cache, caching, speed, fast, optimize, site performance, image optimization, image compression, site security, seo, gzip compression, minify code, code minification 4 Requires at least: 5.1 3 Tags: a2 hosting, cache, speed, optimize, site performanceRequires at least: 5.1 5 4 Tested up to: 6.6 6 Stable tag: 3.0. 95 Stable tag: 3.0.10 7 6 Requires PHP: 7.0 8 7 License: GPLv3 … … 153 152 == Changelog == 154 153 154 = 3.0.10 = 155 * Automatically clean out old front-end benchmarks results as they were getting quite large for some sites. 156 157 = 3.0.8 = 158 * Fixed an issue where sites with low memory limits and tens of thousands of large images may experience problems loading the A2 Optimized dashboard. 159 155 160 = 3.0.7 = 156 161 * Fixed an issue where sites with low memory limits and tens of thousands of large images may experience problems loading the A2 Optimized dashboard
Note: See TracChangeset
for help on using the changeset viewer.