Plugin Directory

Changeset 3168601


Ignore:
Timestamp:
10/14/2024 01:25:06 PM (18 months ago)
Author:
a2hosting
Message:

v3.0.10

Location:
a2-optimized-wp/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • a2-optimized-wp/trunk/a2-optimized.php

    r3110676 r3168601  
    1010 * Plugin Name: A2 Optimized WP
    1111 * Plugin URI: https://wordpress.org/plugins/a2-optimized/
    12  * Version: 3.0.9
     12 * Version: 3.0.10
    1313 * Author: A2 Hosting
    1414 * Author URI: https://www.a2hosting.com/
     
    2525
    2626define( 'A2OPT_VERSION', '3.0' );
    27 define( 'A2OPT_FULL_VERSION', '3.0.9' );
     27define( 'A2OPT_FULL_VERSION', '3.0.10' );
    2828define( 'A2OPT_MIN_PHP', '5.6' );
    2929define( 'A2OPT_MIN_WP', '5.1' );
     
    101101    if (is_admin()) {
    102102        new A2_Optimized_SiteHealth;
     103
     104        $benchmarks = new A2_Optimized_Benchmarks;
     105        $benchmarks->prune_benchmarks('backend', 10);
     106        $benchmarks->prune_benchmarks('frontend', 5);
     107
    103108        if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) {
    104109            add_action('admin_menu', ['A2_Optimized_Optimizations', 'addLockedEditor'], 100, 100);
    105110        }
     111
    106112        if (in_array('easy-hide-login/wp-hide-login.php', apply_filters('active_plugins', get_option('active_plugins')))) {
    107113            add_filter( 'admin_email_check_interval', '__return_false' );
  • a2-optimized-wp/trunk/app/models/admin/class-admin-settings.php

    r3110676 r3168601  
    5656            if ( !wp_verify_nonce($_POST['nonce'], 'a2opt_ajax_nonce') || !current_user_can('manage_options') ) {
    5757                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']);
    5863                wp_die();
    5964            }
     
    505510                'display_text' => 'Web Performance',
    506511                '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',
    508513                '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 />
    509514                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  
    6969            $existing_results[date('Y-m-d H:i:s')] = $results;
    7070
    71             update_option('a2opt-benchmarks-hosting', $existing_results);
     71            update_option('a2opt-benchmarks-hosting', $existing_results, false);
     72            $this->prune_benchmarks('backend', 10);
    7273
    7374            return [
     
    239240
    240241        if ($benchmarks_type == 'frontend') {
    241             update_option('a2opt-benchmarks-frontend', $benchmarks);
     242            update_option('a2opt-benchmarks-frontend', $benchmarks, false);
    242243        } elseif ($benchmarks_type == 'backend') {
    243             update_option('a2opt-benchmarks-hosting', $benchmarks);
     244            update_option('a2opt-benchmarks-hosting', $benchmarks, false);
    244245        }
    245246    }
     
    494495                    'scores' => $this->filter_lighthouse_data($lighthouse_data)
    495496                ];
    496                 update_option($option_key, $existing_results);
     497                update_option($option_key, $existing_results, false);
     498
     499                $this->prune_benchmarks('frontend', 5);
    497500
    498501                $output = [
  • a2-optimized-wp/trunk/core/A2_Optimized_SiteHealth.php

    r2999241 r3168601  
    229229            'post_mime_type' => 'image',
    230230            '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            ]
    232239        ];
    233240
     
    245252        if ($large_image_count > 3) {
    246253            $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' );
    248255            $result['description'] = sprintf(
    249256                '<p>%s</p>',
  • a2-optimized-wp/trunk/readme.txt

    r3110676 r3168601  
    11=== A2 Optimized WP - Turbocharge and secure your WordPress site ===
    22Contributors: 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
     3Tags: a2 hosting, cache, speed, optimize, site performanceRequires at least: 5.1
    54Tested up to: 6.6
    6 Stable tag: 3.0.9
     5Stable tag: 3.0.10
    76Requires PHP: 7.0
    87License: GPLv3
     
    153152== Changelog ==
    154153
     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
    155160= 3.0.7 =
    156161* 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.