A2 Optimized WP - Version 3.0.2.1

Version Description

= 2.0.10.9 = Important security update. Please upgrade immediately.

= 2.0 = New GPL plugin, now updates are through the wordpress.org repository

Download this release

Release Info

Developer a2hosting
Plugin Icon 128x128 A2 Optimized WP
Version 3.0.2.1
Comparing to
See all releases

Code changes from version 3.0.2 to 3.0.2.1

a2-optimized.php CHANGED
@@ -9,7 +9,7 @@
9
  * @wordpress-plugin
10
  * Plugin Name: A2 Optimized WP
11
  * Plugin URI: https://wordpress.org/plugins/a2-optimized/
12
- * Version: 3.0.2
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
9
  * @wordpress-plugin
10
  * Plugin Name: A2 Optimized WP
11
  * Plugin URI: https://wordpress.org/plugins/a2-optimized/
12
+ * Version: 3.0.2.1
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
app/controllers/admin/class-admin-settings.php CHANGED
@@ -27,14 +27,14 @@ if (! class_exists(__NAMESPACE__ . '\\' . 'Admin_Settings')) {
27
  *
28
  * @since 3.0.0
29
  */
30
- public const SETTINGS_PAGE_SLUG = A2_Optimized::PLUGIN_ID;
31
 
32
  /**
33
  * Capability required to access settings page
34
  *
35
  * @since 3.0.0
36
  */
37
- public const REQUIRED_CAPABILITY = 'manage_options';
38
 
39
  /**
40
  * Register callbacks for actions and filters
27
  *
28
  * @since 3.0.0
29
  */
30
+ const SETTINGS_PAGE_SLUG = A2_Optimized::PLUGIN_ID;
31
 
32
  /**
33
  * Capability required to access settings page
34
  *
35
  * @since 3.0.0
36
  */
37
+ const REQUIRED_CAPABILITY = 'manage_options';
38
 
39
  /**
40
  * Register callbacks for actions and filters
app/models/admin/class-admin-settings.php CHANGED
@@ -103,7 +103,10 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
103
  echo json_encode(['result' => 'fail', 'status' => 'Permission Denied']);
104
  wp_die();
105
  }
106
- $new_notification = esc_html($_POST['a2_notification_text']) ?? '';
 
 
 
107
  if (!empty($new_notification)){
108
  $notifications = $this->get_notifications();
109
  $max_id = 0;
@@ -357,7 +360,7 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
357
  return $result;
358
  }
359
 
360
- public const BENCHMARK_DISPLAY_DATA = [
361
  'overall_score' => [
362
  'display_text' => 'Overall Score',
363
  'metric_text' => 'The Performance score is a weighted average of the metric scores.',
@@ -465,7 +468,7 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
465
 
466
  ];
467
 
468
- public const BENCHMARK_SCORE_PROFILES = [
469
  //higher is better [low/med/high] so we will invert the score when checking
470
  'overall_score' => ['success'=>100, 'warn'=>89, 'danger'=>49, 'max'=>100, 'decimalplaces'=>0],
471
  'overall_score_inverted' => ['success'=>0, 'warn'=>11, 'danger'=>51, 'decimalplaces'=>0],
103
  echo json_encode(['result' => 'fail', 'status' => 'Permission Denied']);
104
  wp_die();
105
  }
106
+ $new_notification = '';
107
+ if(isset($_POST) && isset($_POST['a2_notification_text'])){
108
+ $new_notification = esc_html($_POST['a2_notification_text']);
109
+ }
110
  if (!empty($new_notification)){
111
  $notifications = $this->get_notifications();
112
  $max_id = 0;
360
  return $result;
361
  }
362
 
363
+ const BENCHMARK_DISPLAY_DATA = [
364
  'overall_score' => [
365
  'display_text' => 'Overall Score',
366
  'metric_text' => 'The Performance score is a weighted average of the metric scores.',
468
 
469
  ];
470
 
471
+ const BENCHMARK_SCORE_PROFILES = [
472
  //higher is better [low/med/high] so we will invert the score when checking
473
  'overall_score' => ['success'=>100, 'warn'=>89, 'danger'=>49, 'max'=>100, 'decimalplaces'=>0],
474
  'overall_score_inverted' => ['success'=>0, 'warn'=>11, 'danger'=>51, 'decimalplaces'=>0],
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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
5
  Tested up to: 6.1
6
- Stable tag: 3.0.2
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
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
5
  Tested up to: 6.1
6
+ Stable tag: 3.0.2.1
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html