A2 Optimized WP - Version 3.0.3

Version Description

  • Users may now supply their own Google Pagespeed Insights API key to run benchmarks. This is available through the "Advanced Settings" panel under the "Website and Server Performance" tab.
  • If the "Login URL Change" feature is enabled, the new login URL is displayed by the toggle.
  • Other small QoL improvements.
Download this release

Release Info

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

Code changes from version 3.0.2.3 to 3.0.3

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.3
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  }
25
 
26
  define( 'A2OPT_VERSION', '3.0' );
27
- define( 'A2OPT_FULL_VERSION', '3.0.2' );
28
  define( 'A2OPT_MIN_PHP', '5.6' );
29
  define( 'A2OPT_MIN_WP', '5.1' );
30
  define( 'A2OPT_FILE', __FILE__ );
9
  * @wordpress-plugin
10
  * Plugin Name: A2 Optimized WP
11
  * Plugin URI: https://wordpress.org/plugins/a2-optimized/
12
+ * Version: 3.0.3
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
24
  }
25
 
26
  define( 'A2OPT_VERSION', '3.0' );
27
+ define( 'A2OPT_FULL_VERSION', '3.0.3' );
28
  define( 'A2OPT_MIN_PHP', '5.6' );
29
  define( 'A2OPT_MIN_WP', '5.1' );
30
  define( 'A2OPT_FILE', __FILE__ );
app/controllers/admin/class-admin-settings.php CHANGED
@@ -254,15 +254,22 @@ if (! class_exists(__NAMESPACE__ . '\\' . 'Admin_Settings')) {
254
  }
255
  $run_benchmarks = false;
256
  $notifications = $this->get_model()->get_notifications();
 
 
 
 
 
257
  switch ($page) {
258
  case 'server_performance':
259
  $graphs = $this->get_model()->get_frontend_benchmark($run_benchmarks);
 
260
  $this->view->admin_server_performance_page(
261
  [
262
  'page_title' => A2_Optimized::PLUGIN_NAME,
263
  'settings_name' => $this->get_model()->get_plugin_settings_option_key(),
264
  'notifications' => $notifications,
265
- 'graphs' => $graphs['pagespeed_desktop'],
 
266
  'run_benchmarks' => $run_benchmarks,
267
  'status_message' => $graphs['status_message'],
268
  ]
@@ -281,6 +288,17 @@ if (! class_exists(__NAMESPACE__ . '\\' . 'Admin_Settings')) {
281
  ]
282
  );
283
  break;
 
 
 
 
 
 
 
 
 
 
 
284
  case 'optimizations':
285
  $data = $this->get_model()->get_opt_performance();
286
 
254
  }
255
  $run_benchmarks = false;
256
  $notifications = $this->get_model()->get_notifications();
257
+ $options = get_option('a2opt-pagespeed');
258
+ $strategy = 'desktop';
259
+ if (isset($options['default-strategy'])){
260
+ $strategy = $options['default-strategy'];
261
+ }
262
  switch ($page) {
263
  case 'server_performance':
264
  $graphs = $this->get_model()->get_frontend_benchmark($run_benchmarks);
265
+
266
  $this->view->admin_server_performance_page(
267
  [
268
  'page_title' => A2_Optimized::PLUGIN_NAME,
269
  'settings_name' => $this->get_model()->get_plugin_settings_option_key(),
270
  'notifications' => $notifications,
271
+ 'graphs' => $graphs['pagespeed_' . $strategy],
272
+ 'default_strategy' => $strategy,
273
  'run_benchmarks' => $run_benchmarks,
274
  'status_message' => $graphs['status_message'],
275
  ]
288
  ]
289
  );
290
  break;
291
+ case 'advanced_settings':
292
+ $data = $this->get_model()->get_advanced_settings();
293
+ $this->view->admin_advanced_settings_page(
294
+ [
295
+ 'page_title' => A2_Optimized::PLUGIN_NAME,
296
+ 'settings_name' => $this->get_model()->get_plugin_settings_option_key(),
297
+ 'notifications' => $notifications,
298
+ 'data' => $data,
299
+ ]
300
+ );
301
+ break;
302
  case 'optimizations':
303
  $data = $this->get_model()->get_opt_performance();
304
 
app/models/admin/class-admin-settings.php CHANGED
@@ -47,6 +47,7 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
47
 
48
  add_action( 'wp_ajax_run_benchmarks', [$this, 'run_benchmarks'] );
49
  add_action( 'wp_ajax_apply_optimizations', [$this, 'apply_optimizations'] );
 
50
  add_action( 'wp_ajax_add_notification', [$this, 'add_notification'] );
51
  }
52
 
@@ -64,16 +65,19 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
64
  switch($page){
65
  case 'server-performance':
66
  case 'page-speed-score':
67
- $frontend_data = $this->get_frontend_benchmark($run_checks);
68
-
69
  if ($page == 'server-performance') {
70
  $strategy = 'pagespeed_' . $_POST['a2_performance_strategy'];
71
- $frontend_data = $frontend_data[$strategy];
 
 
 
72
  }
73
 
74
  $opt_data = $this->get_opt_performance();
75
 
76
  $data = array_merge($frontend_data, $opt_data['graphs']);
 
77
  break;
78
  case 'hosting-matchup':
79
  $hosting_data = $this->get_hosting_benchmark($run_checks);
@@ -149,6 +153,75 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
149
  wp_die();
150
  }
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  public function get_hosting_benchmark($run = false) {
153
  if($run){
154
  $this->benchmark->run_hosting_test_suite();
@@ -246,9 +319,11 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
246
  break;
247
  }
248
  }
 
249
  // set these to false if no benchmarks
250
  $result['pagespeed_desktop'] = $this->get_graph_data($desktop_check_date, $last_desktop, $prev_desktop);
251
  $result['pagespeed_mobile'] = $this->get_graph_data($mobile_check_date, $last_mobile, $prev_mobile);
 
252
  } else {
253
  $desktop = [
254
  "strategy" => "desktop",
@@ -280,7 +355,6 @@ if ( ! class_exists( __NAMESPACE__ . '\\' . 'Admin_Settings' ) ) {
280
  $result['pagespeed_desktop'] = $this->get_graph_data('None', $desktop, null);
281
  $result['pagespeed_mobile'] = $this->get_graph_data('None', $mobile, null);
282
  }
283
-
284
  $result['status_message'] = $status_message;
285
  return $result;
286
  }
47
 
48
  add_action( 'wp_ajax_run_benchmarks', [$this, 'run_benchmarks'] );
49
  add_action( 'wp_ajax_apply_optimizations', [$this, 'apply_optimizations'] );
50
+ add_action( 'wp_ajax_update_advanced_options', [$this, 'update_advanced_options']);
51
  add_action( 'wp_ajax_add_notification', [$this, 'add_notification'] );
52
  }
53
 
65
  switch($page){
66
  case 'server-performance':
67
  case 'page-speed-score':
68
+ $raw_frontend_data = $this->get_frontend_benchmark($run_checks);
 
69
  if ($page == 'server-performance') {
70
  $strategy = 'pagespeed_' . $_POST['a2_performance_strategy'];
71
+ $frontend_data = $raw_frontend_data[$strategy];
72
+ }
73
+ else {
74
+ $frontend_data = $raw_frontend_data;
75
  }
76
 
77
  $opt_data = $this->get_opt_performance();
78
 
79
  $data = array_merge($frontend_data, $opt_data['graphs']);
80
+ $data['status_message'] = $raw_frontend_data['status_message'];
81
  break;
82
  case 'hosting-matchup':
83
  $hosting_data = $this->get_hosting_benchmark($run_checks);
153
  wp_die();
154
  }
155
 
156
+ public function update_advanced_options() {
157
+ if ( !wp_verify_nonce($_POST['nonce'], 'a2opt_ajax_nonce') || !current_user_can('manage_options') ){
158
+ echo json_encode(['result' => 'fail', 'status' => 'Permission Denied']);
159
+ wp_die();
160
+ }
161
+
162
+ $data = [];
163
+
164
+ $settings = [];
165
+ foreach($_POST as $k => $value){
166
+ if(substr($k, 0, 4) === "opt-"){
167
+ $k = str_replace("opt-", "", $k);
168
+ $settings[$k] = $value;
169
+ }
170
+ }
171
+
172
+ update_option('a2opt-pagespeed', $settings);
173
+
174
+ $data['updated_data']['advanced_settings'] = $this->get_advanced_settings();
175
+
176
+ $data['result'] = 'success';
177
+
178
+ echo json_encode($data);
179
+ wp_die();
180
+
181
+ }
182
+
183
+ public function get_advanced_settings(){
184
+ $advanced_settings_current = get_option('a2opt-pagespeed');
185
+
186
+ if ($advanced_settings_current == null){
187
+ $advanced_settings_current = [
188
+ 'api-key' => '',
189
+ 'default-strategy' =>'desktop'
190
+ ];
191
+ }
192
+
193
+ $advanced_settings['advanced'] = [
194
+ 'title' => 'Advanced Settings',
195
+ 'explanation' => 'Advanced settings for the A2Opt application',
196
+ 'settings_sections' => [
197
+ 'a2opt-pagespeed' => [
198
+ 'title' => '',
199
+ 'description' => '',
200
+ 'settings' => [
201
+ 'default-strategy' => [
202
+ 'description' => 'Default strategy',
203
+ 'label' => '',
204
+ 'input_type' => 'options',
205
+ 'input_options' => [
206
+ 'Desktop' => 'desktop',
207
+ 'Mobile' => 'mobile'
208
+ ],
209
+ 'value' => $advanced_settings_current['default-strategy'],
210
+ ],
211
+ 'api-key' => [
212
+ 'description' => 'Google API Key',
213
+ 'label' => 'Check <a target="_blank" href="https://developers.google.com/speed/docs/insights/v5/get-started">HERE</a> for more information about using a Google API Key. Leave blank if you are unsure.',
214
+ 'input_type' => 'text',
215
+ 'value' => $advanced_settings_current['api-key'],
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ];
221
+
222
+ return $advanced_settings;
223
+ }
224
+
225
  public function get_hosting_benchmark($run = false) {
226
  if($run){
227
  $this->benchmark->run_hosting_test_suite();
319
  break;
320
  }
321
  }
322
+
323
  // set these to false if no benchmarks
324
  $result['pagespeed_desktop'] = $this->get_graph_data($desktop_check_date, $last_desktop, $prev_desktop);
325
  $result['pagespeed_mobile'] = $this->get_graph_data($mobile_check_date, $last_mobile, $prev_mobile);
326
+
327
  } else {
328
  $desktop = [
329
  "strategy" => "desktop",
355
  $result['pagespeed_desktop'] = $this->get_graph_data('None', $desktop, null);
356
  $result['pagespeed_mobile'] = $this->get_graph_data('None', $mobile, null);
357
  }
 
358
  $result['status_message'] = $status_message;
359
  return $result;
360
  }
app/templates/admin/page-settings/page-settings.php CHANGED
@@ -32,6 +32,11 @@
32
  noAction: null,
33
  yesAction: null,
34
  };
 
 
 
 
 
35
  </script>
36
 
37
  <script type="text/x-template" id="info-button-template">
@@ -62,21 +67,6 @@
62
  </div>
63
  </div>
64
  </script>
65
- <!--
66
- <script type="text/x-template" id="flip-panel-template">
67
- <div :id="content_id" class="box-element" :class="status_class" class="flip-card flip-card-inner">
68
- <div class="info-toggle-button">
69
- <span @click="toggleFlipPanel($event);"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></span>
70
- </div>
71
- <div v-show="content_index == 0" class="graph-data flip-card-front">
72
- <slot name="content1"></slot>
73
- </div>
74
- <div v-show="content_index == 1" class="graph-info flip-card-back">
75
- <slot name="content2"></slot>
76
- </div>
77
- </div>
78
- </script>
79
- -->
80
 
81
  <script type="text/x-template" id="graph-legend-template">
82
  <div class="col-sm-10 graph-legend ">
@@ -154,16 +144,7 @@
154
  <script type="text/x-template" id="hosting-matchup-template">
155
  <div class="col-sm-12">
156
  <div class="row">
157
- <div class="col-md-12 col-lg-2 side-nav">
158
- <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
159
- <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=server_performance')"
160
- class="navlink-button" :class="nav.webperf_class">Web Performance</button>
161
- </div>
162
- <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
163
- <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=hosting_matchup')"
164
- class="navlink-button" :class="nav.hmatch_class">Hosting Matchup</button>
165
- </div>
166
- </div>
167
  <div class="col-md-12 col-lg-10 border-left" id="a2-optimized-hostingmatchup">
168
  <div class="row">
169
  <div class="col-sm-12">
@@ -251,10 +232,29 @@
251
  </div>
252
  </script>
253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  <script type="text/x-template" id="optimization-entry">
255
- <div class="row">
 
256
  <div class="col-md-8 col-lg-9 ">
257
- <h4>{{ name }} <a class="glyphicon glyphicon-chevron-down toggle" aria-hidden="true" v-on:click.prevent="desc_toggle(slug)" :id="'opt_item_toggle_' + slug"></a></h4>
 
258
  <div :id="'opt_item_desc_' + slug" style="display: none" v-html="description" class="desc"></div>
259
  <div :id="'opt_item_error_' + slug" v-if="error" v-html="error" style="border: 2px solid red;"></div>
260
  </div>
@@ -268,6 +268,7 @@
268
  </li>
269
  </div>
270
  </div>
 
271
  </script>
272
 
273
  <script type="text/x-template" id="opt-extra-settings-template">
@@ -298,6 +299,9 @@
298
  <div v-else>
299
  <div class="col-md-9">
300
  <h4 class="less-vertical-space setting-desc">{{ setting.description }}</h4>
 
 
 
301
  </div>
302
  </div>
303
  <p v-if="setting.input_type == 'text'">
@@ -520,8 +524,8 @@
520
  <div v-if="show_coaching" class="notice notice-warning">
521
  <p>Click Run Check to see how fast your page loads. The higher the score the better!</p>
522
  </div>
523
- <div v-if="graphs.status_message" class="notice notice-warning">
524
- <p v-html="graphs.status_message"></p>
525
  </div>
526
  </div>
527
  <div class="col-sm-11 col-sm-offset-1">
@@ -621,25 +625,32 @@
621
  </div>
622
  </script>
623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  <script type="text/x-template" id="server-performance-template">
625
  <div class="col-sm-12">
626
  <div class="row">
627
- <div class="col-md-12 col-lg-2 side-nav">
628
- <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
629
- <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=server_performance')"
630
- class="navlink-button" :class="nav.webperf_class">Web Performance</button>
631
- </div>
632
- <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
633
- <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=hosting_matchup')"
634
- class="navlink-button" :class="nav.hmatch_class">Hosting Matchup</button>
635
- </div>
636
- </div>
637
  <div class="col-md-12 col-lg-10 border-left" id="a2-optimized-serverperformance">
638
  <div class="row">
639
  <div class="col-sm-12">
640
  <select name="server-perf-strategy" id="server-perf-strategy-select" class="form-element" @change="strategyChanged($event)">
641
- <option selected value="desktop">Desktop</option>
642
- <option value="mobile">Mobile</option>
643
  </select>
644
  <a class="btn cta-btn-green" @click="pageSpeedCheck()">Run Check</a> <span class="last-check">Last Check: {{ last_check_date }}</span>
645
  </div>
@@ -649,8 +660,8 @@
649
  <div class="notice notice-warning"><p>Click Run Check to see how fast your page loads.</p></div>
650
  </div>
651
  </div>
652
- <div v-if="status_message" class="notice notice-warning">
653
- <p v-html="status_message"></p>
654
  </div>
655
  <div class="row padding-bottom"></div>
656
  <div class="row">
32
  noAction: null,
33
  yesAction: null,
34
  };
35
+ page_data.strategies = [
36
+ {option: 'Desktop', value: 'desktop'},
37
+ {option: 'Mobile', value: 'mobile'},
38
+ ];
39
+ page_data.frontend_benchmark_status = '';
40
  </script>
41
 
42
  <script type="text/x-template" id="info-button-template">
67
  </div>
68
  </div>
69
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  <script type="text/x-template" id="graph-legend-template">
72
  <div class="col-sm-10 graph-legend ">
144
  <script type="text/x-template" id="hosting-matchup-template">
145
  <div class="col-sm-12">
146
  <div class="row">
147
+ <performance-sidebar @nav-change-url="this.$parent.loadSubPage"></performance-sidebar>
 
 
 
 
 
 
 
 
 
148
  <div class="col-md-12 col-lg-10 border-left" id="a2-optimized-hostingmatchup">
149
  <div class="row">
150
  <div class="col-sm-12">
232
  </div>
233
  </script>
234
 
235
+ <script type="text/x-template" id="advanced-settings-template">
236
+ <div class="col-sm-12">
237
+ <div class="row">
238
+ <performance-sidebar @nav-change-url="this.$parent.loadSubPage"></performance-sidebar>
239
+ <div class="col-md-12 col-lg-10 border-left" id="a2-optimized-advanced-settings">
240
+ <opt-extra-settings :extra_settings="advanced_settings" slug_override="advanced">
241
+ </opt-extra-settings>
242
+ </div>
243
+
244
+ <div class="col-sm-9 text-right" style="padding-top: 1em;">
245
+ <a href="#" @click.prevent="updateAdvancedOptions()" class="cta-btn-green btn-xlg btn-lg cta-btn-green text-right">Update</a>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </script>
250
+
251
+
252
  <script type="text/x-template" id="optimization-entry">
253
+ <div>
254
+ <div class="row margin-bottom-20">
255
  <div class="col-md-8 col-lg-9 ">
256
+ <h4 class="less-vertical-space">{{ name }} <a class="glyphicon glyphicon-chevron-down toggle" aria-hidden="true" v-on:click.prevent="desc_toggle(slug)" :id="'opt_item_toggle_' + slug"></a></h4>
257
+ <span v-html="extra_info"></span>
258
  <div :id="'opt_item_desc_' + slug" style="display: none" v-html="description" class="desc"></div>
259
  <div :id="'opt_item_error_' + slug" v-if="error" v-html="error" style="border: 2px solid red;"></div>
260
  </div>
268
  </li>
269
  </div>
270
  </div>
271
+ </div>
272
  </script>
273
 
274
  <script type="text/x-template" id="opt-extra-settings-template">
299
  <div v-else>
300
  <div class="col-md-9">
301
  <h4 class="less-vertical-space setting-desc">{{ setting.description }}</h4>
302
+ <p v-if="setting.label">
303
+ <span v-html="setting.label"></span>
304
+ </p>
305
  </div>
306
  </div>
307
  <p v-if="setting.input_type == 'text'">
524
  <div v-if="show_coaching" class="notice notice-warning">
525
  <p>Click Run Check to see how fast your page loads. The higher the score the better!</p>
526
  </div>
527
+ <div v-if="frontend_benchmark_status" class="notice notice-warning">
528
+ <p v-html="frontend_benchmark_status"></p>
529
  </div>
530
  </div>
531
  <div class="col-sm-11 col-sm-offset-1">
625
  </div>
626
  </script>
627
 
628
+ <script type="text/x-template" id="performance-sidebar-template">
629
+ <div class="col-md-12 col-lg-2 side-nav">
630
+ <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
631
+ <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=server_performance')"
632
+ class="navlink-button" :class="nav.webperf_class">Web Performance</button>
633
+ </div>
634
+ <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
635
+ <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=hosting_matchup')"
636
+ class="navlink-button" :class="nav.hmatch_class">Hosting Matchup</button>
637
+ </div>
638
+ <div class="col-md-5 col-md-offset-1 col-lg-12 col-lg-offset-0 navlink-wrapper">
639
+ <button type="button" @click="$emit('nav-change-url', 'admin.php?page=a2-optimized&a2_page=advanced_settings')"
640
+ class="navlink-button" :class="nav.advs_class">Advanced Settings</button>
641
+ </div>
642
+ </div>
643
+ </script>
644
+
645
  <script type="text/x-template" id="server-performance-template">
646
  <div class="col-sm-12">
647
  <div class="row">
648
+ <performance-sidebar @nav-change-url="this.$parent.loadSubPage"></performance-sidebar>
 
 
 
 
 
 
 
 
 
649
  <div class="col-md-12 col-lg-10 border-left" id="a2-optimized-serverperformance">
650
  <div class="row">
651
  <div class="col-sm-12">
652
  <select name="server-perf-strategy" id="server-perf-strategy-select" class="form-element" @change="strategyChanged($event)">
653
+ <option v-for="s in strategies" :value="s.value" :selected="s.value == default_strategy">{{s.option}}</option>
 
654
  </select>
655
  <a class="btn cta-btn-green" @click="pageSpeedCheck()">Run Check</a> <span class="last-check">Last Check: {{ last_check_date }}</span>
656
  </div>
660
  <div class="notice notice-warning"><p>Click Run Check to see how fast your page loads.</p></div>
661
  </div>
662
  </div>
663
+ <div v-if="frontend_benchmark_status" class="notice notice-warning">
664
+ <p v-html="frontend_benchmark_status"></p>
665
  </div>
666
  <div class="row padding-bottom"></div>
667
  <div class="row">
app/views/admin/class-admin-settings.php CHANGED
@@ -98,6 +98,7 @@ if (! class_exists(__NAMESPACE__ . '\\' . 'Admin_Settings')) {
98
  ],
99
  'last_check_date' => $pagespeed_last_check,
100
  'graphs' => $graphs,
 
101
  'status_message' => $args['status_message'],
102
  ];
103
  $data_json = json_encode($data);
@@ -140,6 +141,31 @@ if (! class_exists(__NAMESPACE__ . '\\' . 'Admin_Settings')) {
140
  $args
141
  ); // WPCS: XSS OK.
142
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  public function admin_opt_performance_page($args = []) {
145
 
98
  ],
99
  'last_check_date' => $pagespeed_last_check,
100
  'graphs' => $graphs,
101
+ 'default_strategy' => $args['default_strategy'],
102
  'status_message' => $args['status_message'],
103
  ];
104
  $data_json = json_encode($data);
141
  $args
142
  ); // WPCS: XSS OK.
143
  }
144
+
145
+ public function admin_advanced_settings_page($args = []) {
146
+ $data = $args['data'];
147
+
148
+ $data = [
149
+ 'mainkey' => 1,
150
+ 'updateView' => 0,
151
+ 'content-element' => '<advanced-settings :update-Child="updateView" :key="mainkey" ' . self::EVENT_LISTENERS . '></advanced-settings>',
152
+ 'home_url' => home_url(),
153
+ 'nav' => [
154
+ 'wsp_class' => 'current',
155
+ 'advs_class' => 'current'
156
+ ],
157
+ 'advanced_settings' => $data
158
+ ];
159
+ $data_json = json_encode($data);
160
+
161
+ $data['data_json'] = $data_json;
162
+ $args['data'] = $data;
163
+
164
+ echo $this->render_template(
165
+ 'admin/page-settings/page-settings.php',
166
+ $args
167
+ ); // WPCS: XSS OK.
168
+ }
169
 
170
  public function admin_opt_performance_page($args = []) {
171
 
assets/css/admin/a2-optimized.css CHANGED
@@ -178,6 +178,9 @@
178
  #a2-optimized-wrapper .box-element .padding-top-30 {
179
  padding-top: 30px;
180
  }
 
 
 
181
  #a2-optimized-wrapper .box-element .row.header {
182
  margin-left: 0;
183
  margin-right: 15px;
178
  #a2-optimized-wrapper .box-element .padding-top-30 {
179
  padding-top: 30px;
180
  }
181
+ #a2-optimized-wrapper .box-element .margin-bottom-20 {
182
+ margin-bottom: 20px;
183
+ }
184
  #a2-optimized-wrapper .box-element .row.header {
185
  margin-left: 0;
186
  margin-right: 15px;
assets/css/admin/a2-optimized.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../scss/a2-optimized.scss"],"names":[],"mappings":"AAaA;EACI,kBARI;;;AAWR;EACI;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EACA;EACA;;AAIR;EACI;;AAKJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA,YACI;EAEJ,YACI;;AAIR;EACI;;AAGJ;EACI;;AAEA;EACI;;AAKZ;EACI;;AAEA;EACI;;AAEA;EACI;;AAOZ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAEA;EACI;;AAKZ;EACI;;AAEA;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAMR;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAIR;EACI;;AAEA;EACI;EACA;;AAMR;EACI;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAKJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAMZ;AAAA;EAEI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAIJ;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;IACA;IACA;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAIJ;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAKR;EACI;EACA;;AAIJ;EACI;EACA;EACA;;AAIJ;EAEI;;AAIA;EACI;;AAKR;EACI;IACI;IACA;;EAEJ;IACI;;EAGJ;IACI;;EACA;IACI;;EAIR;IACI;;EAGJ;AAAA;IAEI;;;AAMR;EACI;IACI","file":"a2-optimized.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../scss/a2-optimized.scss"],"names":[],"mappings":"AAaA;EACI,kBARI;;;AAWR;EACI;AAwgBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CA;AAuQA;AAqMA;AA4IA;AAMA;AAOA;AAYA;AA4BA;;AA7rCA;AAAA;AAAA;AAAA;AAAA;AAAA;EAMI;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEI;;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I;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAEA;EACI;;AAKZ;EACI;;AAEA;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAMR;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAIR;EACI;;AAEA;EACI;EACA;;AAMR;EACI;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAKJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAMZ;AAAA;EAEI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAIJ;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;;;AAIR;EACI;IACI;IACA;IACA;IACA;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAIJ;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;IACI;;EAGJ;IACI;;;AAKR;EACI;EACA;;AAIJ;EACI;EACA;EACA;;AAIJ;EAEI;;AAIA;EACI;;AAKR;EACI;IACI;IACA;;EAEJ;IACI;;EAGJ;IACI;;EACA;IACI;;EAIR;IACI;;EAGJ;AAAA;IAEI;;;AAMR;EACI;IACI","file":"a2-optimized.css"}
assets/js/admin/a2-optimized.js CHANGED
@@ -464,10 +464,11 @@ Vue.component('optimization-entry', {
464
  Vue.component('opt-extra-settings', {
465
  props: {
466
  extra_settings: Object,
 
467
  },
468
  data() {
469
  return {
470
- selected_slug: '',
471
  }
472
  },
473
  computed: {
@@ -487,16 +488,18 @@ Vue.component('opt-extra-settings', {
487
  methods: {
488
  adjustSettingVisibility: function () {
489
  // hide or show the redis/memcached server fields
490
- let cache_type = page_data['extra_settings']['a2_object_cache']['settings_sections']['a2_optimized_objectcache_type']['settings']['a2_optimized_objectcache_type']['value'];
491
-
492
- let memcached_server = document.getElementById('setting-memcached_server');
493
- let redis_server = document.getElementById('setting-redis_server');
494
-
495
- if (memcached_server) {
496
- memcached_server.style = cache_type == 'memcached' ? '' : 'display:none;'
497
- }
498
- if (redis_server) {
499
- redis_server.style = cache_type == 'redis' ? '' : 'display:none;'
 
 
500
  }
501
  }
502
  }
@@ -646,6 +649,13 @@ Vue.component('optimizations-performance', {
646
  }
647
  });
648
 
 
 
 
 
 
 
 
649
  Vue.component("modal", {
650
  props: {
651
  show_busy: { Boolean: false },
@@ -657,6 +667,67 @@ Vue.component("modal", {
657
  template: "#modal-template"
658
  });
659
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
660
  Vue.component('server-performance', {
661
  data() {
662
  return page_data
@@ -816,11 +887,19 @@ let app = new Vue({
816
  page_data.closeModal();
817
  })
818
  .then((response) => {
819
- if (run_checks) {
 
 
820
  page_data.last_check_date = 'just now';
821
  } else {
822
- page_data.last_check_date = response.data.overall_score.last_check_date;
 
 
 
 
 
823
  }
 
824
  if (page == 'hosting-matchup') {
825
  page_data.graphs = response.data.graphs;
826
  page_data.graph_data = response.data.graph_data;
464
  Vue.component('opt-extra-settings', {
465
  props: {
466
  extra_settings: Object,
467
+ slug_override: String
468
  },
469
  data() {
470
  return {
471
+ selected_slug: this.slug_override ?? '',
472
  }
473
  },
474
  computed: {
488
  methods: {
489
  adjustSettingVisibility: function () {
490
  // hide or show the redis/memcached server fields
491
+ if (page_data['extra_settings']){
492
+ let cache_type = page_data['extra_settings']['a2_object_cache']['settings_sections']['a2_optimized_objectcache_type']['settings']['a2_optimized_objectcache_type']['value'];
493
+
494
+ let memcached_server = document.getElementById('setting-memcached_server');
495
+ let redis_server = document.getElementById('setting-redis_server');
496
+
497
+ if (memcached_server) {
498
+ memcached_server.style = cache_type == 'memcached' ? '' : 'display:none;'
499
+ }
500
+ if (redis_server) {
501
+ redis_server.style = cache_type == 'redis' ? '' : 'display:none;'
502
+ }
503
  }
504
  }
505
  }
649
  }
650
  });
651
 
652
+ Vue.component("performance-sidebar", {
653
+ data() {
654
+ return page_data;
655
+ },
656
+ template: "#performance-sidebar-template"
657
+ });
658
+
659
  Vue.component("modal", {
660
  props: {
661
  show_busy: { Boolean: false },
667
  template: "#modal-template"
668
  });
669
 
670
+ Vue.component('advanced-settings', {
671
+ data() {
672
+ return page_data;
673
+ },
674
+ template: "#advanced-settings-template",
675
+ methods: {
676
+ updateAdvancedOptions: function (event, slug = "", value = "") {
677
+ page_data.openModal('Updating Options...');
678
+ let params = new URLSearchParams();
679
+ params.append('action', 'update_advanced_options');
680
+ params.append('nonce', ajax.nonce);
681
+
682
+ let root_object = page_data.advanced_settings;
683
+
684
+ if (slug) {
685
+ params.append('opt-' + slug, value);
686
+ }
687
+ else {
688
+ for (let parent in root_object) { // a2_page_cache
689
+ for (let item in root_object[parent]['settings_sections']) { // site_clear
690
+ for (let subitem in root_object[parent]['settings_sections'][item]['settings']) { // clear_site_cache_on_changed_plugin
691
+ params.append('opt-' + subitem, root_object[parent]['settings_sections'][item]['settings'][subitem]['value']);
692
+
693
+ // If this item has extra_fields
694
+ if (root_object[parent]['settings_sections'][item]['settings'][subitem].hasOwnProperty('extra_fields')) {
695
+ for (let extra_field in root_object[parent]['settings_sections'][item]['settings'][subitem]['extra_fields']) { // cache_expiry_time
696
+ params.append('opt-' + extra_field, root_object[parent]['settings_sections'][item]['settings'][subitem]['extra_fields'][extra_field]['value']);
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }
702
+ }
703
+
704
+ axios
705
+ .post(ajax.url, params)
706
+ .catch((error) => {
707
+ alert('There was a problem getting optimization data. See console log.');
708
+ console.log(error.message);
709
+ page_data.closeModal();
710
+ })
711
+ .then((response) => {
712
+ page_data.closeModal();
713
+ if (response.data.updated_data != null) {
714
+ page_data.advanced_settings = response.data.updated_data.advanced_settings;
715
+ page_data.mainkey++;
716
+ page_data.showSuccess = true;
717
+ }
718
+ else {
719
+ alert('invalid data received, please reload page');
720
+ page_data.mainkey++;
721
+ page_data.showSuccess = false;
722
+ }
723
+ this.$nextTick(function () { // wait until things are re-rendered from the mainkey++ update, and then trigger the circles re-render
724
+ page_data.updateView++;
725
+ });
726
+ });
727
+ }
728
+ }
729
+ });
730
+
731
  Vue.component('server-performance', {
732
  data() {
733
  return page_data
887
  page_data.closeModal();
888
  })
889
  .then((response) => {
890
+ let status_message = response.data.status_message;
891
+
892
+ if (run_checks && status_message == '') {
893
  page_data.last_check_date = 'just now';
894
  } else {
895
+ if (response.data.overall_score){
896
+ page_data.last_check_date = response.data.overall_score.last_check_date;
897
+ }
898
+ else {
899
+ page_data.last_check_date = response.data.pagespeed_desktop.overall_score.last_check_date;
900
+ }
901
  }
902
+ page_data.frontend_benchmark_status = status_message;
903
  if (page == 'hosting-matchup') {
904
  page_data.graphs = response.data.graphs;
905
  page_data.graph_data = response.data.graph_data;
assets/scss/a2-optimized.scss CHANGED
@@ -208,6 +208,10 @@ $thishost: #009aca;
208
  padding-top: 30px;
209
  }
210
 
 
 
 
 
211
  .row.header {
212
  margin-left: 0;
213
  margin-right: 15px;
208
  padding-top: 30px;
209
  }
210
 
211
+ .margin-bottom-20 {
212
+ margin-bottom: 20px;
213
+ }
214
+
215
  .row.header {
216
  margin-left: 0;
217
  margin-right: 15px;
core/A2_Optimized_Benchmark.php CHANGED
@@ -455,13 +455,15 @@ class A2_Optimized_Benchmark {
455
  * @param string $strategy Desktop or Mobile
456
  * @return array $results Array containing the results of the test
457
  */
458
- public function get_lighthouse_results($strategy = "desktop", $retry_count = 3, $result_desc = null){
459
  $output = [];
460
-
461
  $url = 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=' . get_site_url() . '&strategy=' . $strategy;
462
-
 
 
 
463
  $response = wp_remote_get($url, ['timeout' => 15]);
464
-
465
  if(is_array($response) && !is_wp_error($response)){
466
  $lighthouse_data = json_decode($response['body'], true);
467
  if(!isset($lighthouse_data['error']) || empty($lighthouse_data['error'])){
@@ -481,19 +483,24 @@ class A2_Optimized_Benchmark {
481
 
482
  $output = [
483
  'status' => 'success',
484
- 'message' => 'New results from Pagespeed Insights recorded.'
485
  ];
486
  } else {
487
- if ($retry_count > 0){
488
- $output = $this->get_lighthouse_results($strategy, $retry_count--, $result_desc);
489
- } else {
 
 
 
490
  $output = [
491
  'status' => 'error',
492
- 'message' => 'There was an error retrieving results from Pagespeed. Please try again in a few minutes.',
493
  ];
494
  }
 
 
 
495
  };
496
-
497
  } else {
498
  $output = [
499
  'status' => 'error',
455
  * @param string $strategy Desktop or Mobile
456
  * @return array $results Array containing the results of the test
457
  */
458
+ public function get_lighthouse_results($strategy = "desktop", $retry_count = 5, $result_desc = null){
459
  $output = [];
460
+
461
  $url = 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=' . get_site_url() . '&strategy=' . $strategy;
462
+ $pagespeed_options = get_option('a2opt-pagespeed');
463
+ if($pagespeed_options && isset($pagespeed_options['api-key'])){
464
+ $url .= '&key=' . $pagespeed_options['api-key'];
465
+ }
466
  $response = wp_remote_get($url, ['timeout' => 15]);
 
467
  if(is_array($response) && !is_wp_error($response)){
468
  $lighthouse_data = json_decode($response['body'], true);
469
  if(!isset($lighthouse_data['error']) || empty($lighthouse_data['error'])){
483
 
484
  $output = [
485
  'status' => 'success',
486
+ 'message' => ''
487
  ];
488
  } else {
489
+ $error_code = $lighthouse_data['error']['code'];
490
+ if (in_array($error_code, [500,400]) || $retry_count <= 0){
491
+ $error_msg = '';
492
+ if(isset($lighthouse_data['error']['message'])){
493
+ $error_msg = $lighthouse_data['error']['message'];
494
+ }
495
  $output = [
496
  'status' => 'error',
497
+ 'message' => 'There was an error retrieving results from Pagespeed. ' . $error_msg,
498
  ];
499
  }
500
+ else {
501
+ $output = $this->get_lighthouse_results($strategy, --$retry_count, $result_desc);
502
+ }
503
  };
 
504
  } else {
505
  $output = [
506
  'status' => 'error',
core/A2_Optimized_Optimizations.php CHANGED
@@ -268,6 +268,7 @@ class A2_Optimized_Optimizations {
268
  'description' => '<strong>Benefit:</strong> Makes your site faster for your visitors.<br />
269
  <strong>How-it-works:</strong> Allows site visitors to save copies of your web pages on their device or browser. When they return to your website in the future, your site files will load faster.<br />
270
  <strong>What does it impact:</strong> Time to First Byte (TTFB)',
 
271
  ],
272
  'a2_page_cache_gzip' => [
273
  'error' => '',
@@ -280,6 +281,7 @@ class A2_Optimized_Optimizations {
280
  'description' => '<strong>Benefit:</strong> Makes your site faster for visitors.<br />
281
  <strong>How it works:</strong> Compresses all text files to make them smaller.<br />
282
  <strong>What does it impact:</strong> Time to First Byte (TTFB)',
 
283
  ],
284
  'a2_object_cache' => [
285
  'error' => '',
@@ -292,6 +294,7 @@ class A2_Optimized_Optimizations {
292
  'description' => '<strong>Benefit:</strong> Makes your site faster.<br />
293
  <strong>How-it-works:</strong> Serves cached items such as images, files, and metadata in less than a millisecond. You have the option to modify these settings to best suit your needs. <br />
294
  Tap Modify to make changes.',
 
295
  ],
296
  'a2_page_cache_minify_html' => [
297
  'error' => '',
@@ -303,7 +306,8 @@ class A2_Optimized_Optimizations {
303
  'compatibility' => ['pagebuilder', 'jsmin'],
304
  'description' => '<strong>Benefit:</strong> Increases your site’s speed by reducing the file size sent to site visitors.<br />
305
  <strong>How it works:</strong> Removes extra spaces, tables, and line breaks in the HTML.',
306
- 'remove_link' => true
 
307
  ],
308
  'a2_page_cache_minify_jscss' => [
309
  'error' => '',
@@ -317,7 +321,8 @@ class A2_Optimized_Optimizations {
317
  'description' => '<strong>Benefit:</strong> Reduces the size of files sent to your customer.<br />
318
  <strong>How it works:</strong> Removes extra spaces, tabs, and line breaks in inline CSS and Javascript.<br />
319
  <strong>What to know:</strong> This may cause issues with some page builders or other Javascript-heavy front-end plugins/themes. ',
320
- 'remove_link' => true
 
321
  ],
322
  'a2_db_optimizations' => [
323
  'error' => '',
@@ -330,6 +335,7 @@ class A2_Optimized_Optimizations {
330
  <strong>How it works:</strong> Periodically cleans MySQL database of expired transients (a type of cached data used in WordPress) as well as trashed and spam comments. It will also optimize all tables. You can select to also remove post revisions and trashed posts from the Database Optimization Settings. You have the option to modify these settings to best suit your needs. <br />
331
  Tap Modify to make changes.
332
  ',
 
333
  ],
334
  'woo_cart_fragments' => [
335
  'error' => '',
@@ -342,6 +348,7 @@ class A2_Optimized_Optimizations {
342
  'description' => '<strong>Benefit:</strong> Makes your WooCommerce site faster<br />
343
  <strong>How-it-works:</strong> Disables WooCommerce Cart Fragments on your homepage, and enables the "redirect to cart page" option in WooCommerce.<br />
344
  <strong>What to know:</strong> Slow performance and errors on WooCommerce sites are caused by a high number of AJAX requests because they are uncached. If you are running a WooCommerce site and notice a high number of AJAX requests, disabling Cart Fragments AJAX may help improve your site\'s stability. ',
 
345
  ],
346
  'xmlrpc_requests' => [
347
  'error' => '',
@@ -354,6 +361,7 @@ class A2_Optimized_Optimizations {
354
  'description' => '<strong>Benefit:</strong> Improves the security of your website.<br />
355
  <strong>How-it-works:</strong> Disables XML-RPC services. Although XML-RPC API is safe and is enabled by default, some WordPress security experts suggest disabling it.<br />
356
  <strong>What to know:</strong> Closes one more door that a potential hacker may try to exploit to hack your website.',
 
357
  ],
358
  'htaccess' => [
359
  'error' => '',
@@ -367,6 +375,7 @@ class A2_Optimized_Optimizations {
367
  'description' => '<strong>Benefit:</strong> Protects your configuration files - parameters, options, settings, and preferences applied to an operating system.<br />
368
  <strong>How-it-works:</strong> Generates a Forbidden error to web users and bots when trying to access WordPress configuration files.<br />
369
  <strong>What to know:</strong> Prevents POST requests to the site not originating from a user on the site. If you are using a plugin to allow remote posts and comments, disable this option.',
 
370
  ],
371
  'lock_editing' => [
372
  'error' => '',
@@ -378,6 +387,7 @@ class A2_Optimized_Optimizations {
378
  'kb' => 'http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/optimizing-wordpress-with-the-a2-optimized-plugin',
379
  'description' => '<strong>Benefit:</strong> Improves the security of your website.<br />
380
  <strong>How-it-works:</strong> Prevents misuse of the WordPress Admin built-in editing capabilities.',
 
381
  ],
382
  'hide_login' => [
383
  'error' => '',
@@ -390,6 +400,7 @@ class A2_Optimized_Optimizations {
390
  'description' => '<strong>Benefit:</strong> Makes it more difficult for bad actors and bots to hack your website.<br />
391
  <strong>How it works:</strong> Changes the URL of the login page for your WordPress website.<br />
392
  <strong>What to know:</strong> Record the new login page URL so you don’t forget where to log in. ',
 
393
  ],
394
  'captcha' => [
395
  'error' => '',
@@ -400,6 +411,7 @@ class A2_Optimized_Optimizations {
400
  'configured' => false,
401
  'description' => '<strong>Benefit:</strong> Decreases spam and increase your site’s security. <br />
402
  <strong>How-it-works:</strong> Adds CAPTCHA to comment forms and login screens to deter bots from posting comments to your blog or brute force login - a hacking method that uses trial and error to crack passwords, login credentials, and encryption keys - to your admin panel.',
 
403
  ],
404
  'compress_images' => [
405
  'error' => '',
@@ -410,6 +422,7 @@ class A2_Optimized_Optimizations {
410
  'configured' => false,
411
  'description' => '<strong>Benefit:</strong> Reduces the file size of your images to make your website load faster.<br />
412
  <strong>How it works:</strong> Automatically compresses images when you upload them to your site.',
 
413
  ],
414
  'turbo' => [
415
  'error' => '',
@@ -422,6 +435,7 @@ class A2_Optimized_Optimizations {
422
  'description' => '<strong>Benefit:</strong> Operates on a limited occupancy, upgraded server hardware with advanced caching software making the CPU (central processing unit) 40% faster and 20x faster page loads.<br />
423
  <strong>How it works:</strong> Servers compile .htaccess files - a file that controls the high-level configuration of your website - to make speed improvements. Any changes to .htaccess files are immediately re-compiled. Turbo Web Hosting servers have their own PHP API that provides speed improvements.<br />
424
  <strong>What to know:</strong> Turbo servers can handle 9X more traffic with 3X faster read/write speeds.',
 
425
  ],
426
  ];
427
 
@@ -451,12 +465,14 @@ class A2_Optimized_Optimizations {
451
  $private_optimizations = $this->private_opts->get_optimizations();
452
  // pull any fields from opt to private opt that may be missing.
453
  $new_optimizations = array_merge($optimizations, $private_optimizations);
454
- $preserve_keys = ['description', 'error'];
455
  foreach ($new_optimizations as $key => $opt){
456
  foreach ($preserve_keys as $preserve){
457
  if (!isset($opt[$preserve])){
458
  if (array_key_exists($key, $optimizations)){
459
- $new_optimizations[$key][$preserve] = $optimizations[$key][$preserve];
 
 
460
  }
461
  else {
462
  $new_optimizations[$key][$preserve] = '';
@@ -484,6 +500,13 @@ class A2_Optimized_Optimizations {
484
  $optimizations['a2_object_cache']['error'] = "Unable to update object cache: {$invalid}. Please check your connection information.";
485
  }
486
 
 
 
 
 
 
 
 
487
  return $optimizations;
488
  }
489
 
268
  'description' => '<strong>Benefit:</strong> Makes your site faster for your visitors.<br />
269
  <strong>How-it-works:</strong> Allows site visitors to save copies of your web pages on their device or browser. When they return to your website in the future, your site files will load faster.<br />
270
  <strong>What does it impact:</strong> Time to First Byte (TTFB)',
271
+ 'extra_info' => ''
272
  ],
273
  'a2_page_cache_gzip' => [
274
  'error' => '',
281
  'description' => '<strong>Benefit:</strong> Makes your site faster for visitors.<br />
282
  <strong>How it works:</strong> Compresses all text files to make them smaller.<br />
283
  <strong>What does it impact:</strong> Time to First Byte (TTFB)',
284
+ 'extra_info' => ''
285
  ],
286
  'a2_object_cache' => [
287
  'error' => '',
294
  'description' => '<strong>Benefit:</strong> Makes your site faster.<br />
295
  <strong>How-it-works:</strong> Serves cached items such as images, files, and metadata in less than a millisecond. You have the option to modify these settings to best suit your needs. <br />
296
  Tap Modify to make changes.',
297
+ 'extra_info' => ''
298
  ],
299
  'a2_page_cache_minify_html' => [
300
  'error' => '',
306
  'compatibility' => ['pagebuilder', 'jsmin'],
307
  'description' => '<strong>Benefit:</strong> Increases your site’s speed by reducing the file size sent to site visitors.<br />
308
  <strong>How it works:</strong> Removes extra spaces, tables, and line breaks in the HTML.',
309
+ 'remove_link' => true,
310
+ 'extra_info' => ''
311
  ],
312
  'a2_page_cache_minify_jscss' => [
313
  'error' => '',
321
  'description' => '<strong>Benefit:</strong> Reduces the size of files sent to your customer.<br />
322
  <strong>How it works:</strong> Removes extra spaces, tabs, and line breaks in inline CSS and Javascript.<br />
323
  <strong>What to know:</strong> This may cause issues with some page builders or other Javascript-heavy front-end plugins/themes. ',
324
+ 'remove_link' => true,
325
+ 'extra_info' => ''
326
  ],
327
  'a2_db_optimizations' => [
328
  'error' => '',
335
  <strong>How it works:</strong> Periodically cleans MySQL database of expired transients (a type of cached data used in WordPress) as well as trashed and spam comments. It will also optimize all tables. You can select to also remove post revisions and trashed posts from the Database Optimization Settings. You have the option to modify these settings to best suit your needs. <br />
336
  Tap Modify to make changes.
337
  ',
338
+ 'extra_info' => ''
339
  ],
340
  'woo_cart_fragments' => [
341
  'error' => '',
348
  'description' => '<strong>Benefit:</strong> Makes your WooCommerce site faster<br />
349
  <strong>How-it-works:</strong> Disables WooCommerce Cart Fragments on your homepage, and enables the "redirect to cart page" option in WooCommerce.<br />
350
  <strong>What to know:</strong> Slow performance and errors on WooCommerce sites are caused by a high number of AJAX requests because they are uncached. If you are running a WooCommerce site and notice a high number of AJAX requests, disabling Cart Fragments AJAX may help improve your site\'s stability. ',
351
+ 'extra_info' => ''
352
  ],
353
  'xmlrpc_requests' => [
354
  'error' => '',
361
  'description' => '<strong>Benefit:</strong> Improves the security of your website.<br />
362
  <strong>How-it-works:</strong> Disables XML-RPC services. Although XML-RPC API is safe and is enabled by default, some WordPress security experts suggest disabling it.<br />
363
  <strong>What to know:</strong> Closes one more door that a potential hacker may try to exploit to hack your website.',
364
+ 'extra_info' => ''
365
  ],
366
  'htaccess' => [
367
  'error' => '',
375
  'description' => '<strong>Benefit:</strong> Protects your configuration files - parameters, options, settings, and preferences applied to an operating system.<br />
376
  <strong>How-it-works:</strong> Generates a Forbidden error to web users and bots when trying to access WordPress configuration files.<br />
377
  <strong>What to know:</strong> Prevents POST requests to the site not originating from a user on the site. If you are using a plugin to allow remote posts and comments, disable this option.',
378
+ 'extra_info' => ''
379
  ],
380
  'lock_editing' => [
381
  'error' => '',
387
  'kb' => 'http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/optimizing-wordpress-with-the-a2-optimized-plugin',
388
  'description' => '<strong>Benefit:</strong> Improves the security of your website.<br />
389
  <strong>How-it-works:</strong> Prevents misuse of the WordPress Admin built-in editing capabilities.',
390
+ 'extra_info' => ''
391
  ],
392
  'hide_login' => [
393
  'error' => '',
400
  'description' => '<strong>Benefit:</strong> Makes it more difficult for bad actors and bots to hack your website.<br />
401
  <strong>How it works:</strong> Changes the URL of the login page for your WordPress website.<br />
402
  <strong>What to know:</strong> Record the new login page URL so you don’t forget where to log in. ',
403
+ 'extra_info' => ''
404
  ],
405
  'captcha' => [
406
  'error' => '',
411
  'configured' => false,
412
  'description' => '<strong>Benefit:</strong> Decreases spam and increase your site’s security. <br />
413
  <strong>How-it-works:</strong> Adds CAPTCHA to comment forms and login screens to deter bots from posting comments to your blog or brute force login - a hacking method that uses trial and error to crack passwords, login credentials, and encryption keys - to your admin panel.',
414
+ 'extra_info' => ''
415
  ],
416
  'compress_images' => [
417
  'error' => '',
422
  'configured' => false,
423
  'description' => '<strong>Benefit:</strong> Reduces the file size of your images to make your website load faster.<br />
424
  <strong>How it works:</strong> Automatically compresses images when you upload them to your site.',
425
+ 'extra_info' => ''
426
  ],
427
  'turbo' => [
428
  'error' => '',
435
  'description' => '<strong>Benefit:</strong> Operates on a limited occupancy, upgraded server hardware with advanced caching software making the CPU (central processing unit) 40% faster and 20x faster page loads.<br />
436
  <strong>How it works:</strong> Servers compile .htaccess files - a file that controls the high-level configuration of your website - to make speed improvements. Any changes to .htaccess files are immediately re-compiled. Turbo Web Hosting servers have their own PHP API that provides speed improvements.<br />
437
  <strong>What to know:</strong> Turbo servers can handle 9X more traffic with 3X faster read/write speeds.',
438
+ 'extra_info' => ''
439
  ],
440
  ];
441
 
465
  $private_optimizations = $this->private_opts->get_optimizations();
466
  // pull any fields from opt to private opt that may be missing.
467
  $new_optimizations = array_merge($optimizations, $private_optimizations);
468
+ $preserve_keys = ['description', 'error', 'kb', 'extra_info'];
469
  foreach ($new_optimizations as $key => $opt){
470
  foreach ($preserve_keys as $preserve){
471
  if (!isset($opt[$preserve])){
472
  if (array_key_exists($key, $optimizations)){
473
+ if (array_key_exists($preserve, $optimizations[$key])){
474
+ $new_optimizations[$key][$preserve] = $optimizations[$key][$preserve];
475
+ }
476
  }
477
  else {
478
  $new_optimizations[$key][$preserve] = '';
500
  $optimizations['a2_object_cache']['error'] = "Unable to update object cache: {$invalid}. Please check your connection information.";
501
  }
502
 
503
+ if ($optimizations['hide_login']['configured'] == true){
504
+ $login_url_option = get_option('wpseh_l01gnhdlwp');
505
+ $login_url = home_url() . "?" . $login_url_option;
506
+ $message = "Your login url is: <a href='{$login_url}'>{$login_url}</a>";
507
+ $optimizations['hide_login']['extra_info'] = $message;
508
+ }
509
+
510
  return $optimizations;
511
  }
512
 
core/A2_Optimized_SiteHealth.php CHANGED
@@ -689,15 +689,17 @@ class A2_Optimized_SiteHealth {
689
  );
690
 
691
  /* CPU Info */
692
- $cpu_info = exec('cat /proc/cpuinfo | grep "model name\\|processor"');
693
- $cpu_info = str_replace('model name', '', $cpu_info);
694
- $cpu_info = str_replace('processor', '', $cpu_info);
695
- $cpu_info = str_replace(':', '', $cpu_info);
696
- $a2_optimized['fields']['cpu_info'] = array(
697
- 'label' => 'CPU Info',
698
- 'value' => $cpu_info
699
- );
700
-
 
 
701
  /* Webserver info */
702
  $a2_optimized['fields']['http_server'] = array(
703
  'label' => 'Web Server',
689
  );
690
 
691
  /* CPU Info */
692
+ if(function_exists('exec')){
693
+ $cpu_info = exec('cat /proc/cpuinfo | grep "model name\\|processor"');
694
+ $cpu_info = str_replace('model name', '', $cpu_info);
695
+ $cpu_info = str_replace('processor', '', $cpu_info);
696
+ $cpu_info = str_replace(':', '', $cpu_info);
697
+ $a2_optimized['fields']['cpu_info'] = array(
698
+ 'label' => 'CPU Info',
699
+ 'value' => $cpu_info
700
+ );
701
+ };
702
+
703
  /* Webserver info */
704
  $a2_optimized['fields']['http_server'] = array(
705
  'label' => 'Web Server',
readme.txt CHANGED
@@ -2,8 +2,8 @@
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
5
- Tested up to: 6.1
6
- Stable tag: 3.0.2.3
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -150,6 +150,11 @@ Yes. A2 Optimized works on any host that supports WordPress; however, A2 Hostin
150
 
151
  == Changelog ==
152
 
 
 
 
 
 
153
  = 3.0.2.2 =
154
  * Small update for A2 hosting customers
155
 
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
5
+ Tested up to: 6.1.1
6
+ Stable tag: 3.0.3
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
150
 
151
  == Changelog ==
152
 
153
+ = 3.0.3 =
154
+ * Users may now supply their own Google Pagespeed Insights API key to run benchmarks. This is available through the "Advanced Settings" panel under the "Website and Server Performance" tab.
155
+ * If the "Login URL Change" feature is enabled, the new login URL is displayed by the toggle.
156
+ * Other small QoL improvements.
157
+
158
  = 3.0.2.2 =
159
  * Small update for A2 hosting customers
160