Speed Booster Pack - Version 4.3.3.1

Version Description

Release Date: 16 October 2021

Had to release a tiny hotfix because we forgot to change the version. And while we're at it, we edited the readme a bit.

Download this release

Release Info

Developer optimocha
Plugin Icon 128x128 Speed Booster Pack
Version 4.3.3.1
Comparing to
See all releases

Code changes from version 4.3.3 to 4.3.3.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: speed, pagespeed, optimization, core web vitals, cache
5
  Requires at least: 4.6
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 4.3.2
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -60,7 +60,7 @@ More than half of WordPress users don't speak English, and missing out so much!
60
  Speed optimization plugins might do a great job at optimizing your website and increasing your PageSpeed scores, but even they can't perform well on websites with poor setups. There are lots of factors to think about when it comes to web performance optimization. That's where we, as Optimocha, come in: We log in to your website; create a specialized optimization report considering all your plugins, your theme settings, your hosting environment and your whole content; then we get our hands dirty to get your website as fast as possible. To learn more about our services and get in touch with us, here are some links:
61
 
62
  * [One-time speed optimization services](https://optimocha.com/speed-optimization-for-wordpress/)
63
- * [Monthly speed optimization & maintenance services](https://optimocha.com/monthly-wordpress-optimization-maintenance/)
64
  * [Contact Optimocha](https://optimocha.com/contact/)
65
 
66
  ### Disclaimer
@@ -104,6 +104,24 @@ All the time! We're always looking for new ways to get this plugin to a better s
104
 
105
  == Changelog ==
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  = 4.3.2 =
108
 
109
  *Release Date: 01 October 2021*
5
  Requires at least: 4.6
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 4.3.3.1
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
60
  Speed optimization plugins might do a great job at optimizing your website and increasing your PageSpeed scores, but even they can't perform well on websites with poor setups. There are lots of factors to think about when it comes to web performance optimization. That's where we, as Optimocha, come in: We log in to your website; create a specialized optimization report considering all your plugins, your theme settings, your hosting environment and your whole content; then we get our hands dirty to get your website as fast as possible. To learn more about our services and get in touch with us, here are some links:
61
 
62
  * [One-time speed optimization services](https://optimocha.com/speed-optimization-for-wordpress/)
63
+ * [Monthly speed optimization & maintenance services](https://optimocha.com/speed-optimization-for-wordpress/#ongoing-optimization)
64
  * [Contact Optimocha](https://optimocha.com/contact/)
65
 
66
  ### Disclaimer
104
 
105
  == Changelog ==
106
 
107
+ = 4.3.3.1 =
108
+
109
+ *Release Date: 16 October 2021*
110
+
111
+ Had to release a tiny hotfix because we _forgot_ to change the version. And while we're at it, we edited the readme a bit.
112
+
113
+ = 4.3.3 =
114
+
115
+ *Release Date: 16 October 2021*
116
+
117
+ * **Improved**: The Speed Booster Pack metabox in post/page edit screens is now shoed only to admins.
118
+ * **Improved**: The settings page looks more clean now.
119
+ * **Improved**: Added `data-noptimize` and `data-sbp-skip` to the default exclude lists of the JS optimizer.
120
+ * **Updated**: lazyload.js was updated to version 17.5.0.
121
+ * **Removed**: The PageSpeed Tricker feature is removed.
122
+ * **Fixed**: Corrected the behavior of SBP when another plugin's page caching was active _and_ SBP's page caching weren't.
123
+ * **Patched**: A security issue with the database optimizer was patched.
124
+
125
  = 4.3.2 =
126
 
127
  *Release Date: 01 October 2021*
admin/class-speed-booster-pack-admin.php CHANGED
@@ -543,6 +543,15 @@ class Speed_Booster_Pack_Admin {
543
  $cache_fields = array_merge( $restricted_hosting_notice, $cache_fields );
544
  }
545
 
 
 
 
 
 
 
 
 
 
546
  CSF::createSection(
547
  $prefix,
548
  [
543
  $cache_fields = array_merge( $restricted_hosting_notice, $cache_fields );
544
  }
545
 
546
+
547
+ if ( sbp_get_option( 'module_caching' ) && ! defined( 'SBP_ADVANCED_CACHE' ) ) {
548
+ $cache_fields = array_merge( [ [
549
+ 'type' => 'submessage',
550
+ 'style' => 'danger',
551
+ 'content' => sprintf( __( '%1$s cache is enabled but the advanced-cache.php file is created by another plugin. Saving your settings now will overwrite %1$s\'s advanced-cache.php file. To fix this, you can either disable the other plugin\'s caching feature or ours.', 'speed-booster-pack' ), SBP_PLUGIN_NAME ),
552
+ ] ], $cache_fields );
553
+ }
554
+
555
  CSF::createSection(
556
  $prefix,
557
  [
includes/classes/class-sbp-database-optimizer.php CHANGED
@@ -53,7 +53,7 @@ class SBP_Database_Optimizer extends SBP_Abstract_Module {
53
  global $wpdb;
54
  $wpdb->hide_errors();
55
 
56
- $result = $wpdb->get_results( 'ALTER TABLE ' . $table_name . ' ENGINE=INNODB' );
57
  if ( $wpdb->last_error ) {
58
  echo wp_json_encode( [
59
  'status' => 'failure',
53
  global $wpdb;
54
  $wpdb->hide_errors();
55
 
56
+ $wpdb->query( $wpdb->prepare('ALTER TABLE %1$s ENGINE=INNODB', $table_name ) );
57
  if ( $wpdb->last_error ) {
58
  echo wp_json_encode( [
59
  'status' => 'failure',
includes/classes/class-sbp-migrator.php CHANGED
@@ -234,7 +234,7 @@ ga('send', 'pageview');";
234
  $this->sbp_options['js_optimize'] = 'off';
235
  $this->sbp_options['js_footer'] = 1;
236
  $this->sbp_options['js_footer_exclude'] = $this->sbp_options['js_exclude'];
237
- $has_changed = true;
238
  }
239
 
240
  if ( $has_changed === true ) {
@@ -257,10 +257,13 @@ ga('send', 'pageview');";
257
 
258
  public function update_pagespeed_tricker() {
259
  if ( sbp_get_option( 'pagespeed_tricker' ) && current_user_can( 'manage_options' ) ) {
260
- $this->sbp_options = get_option( 'sbp_options' );
261
- $this->sbp_options['pagespeed_tricker'] = 0;
262
- update_option('sbp_options', $this->sbp_options);
263
- SBP_WP_Config_Injector::inject_wp_config();
 
 
 
264
  }
265
  }
266
  }
234
  $this->sbp_options['js_optimize'] = 'off';
235
  $this->sbp_options['js_footer'] = 1;
236
  $this->sbp_options['js_footer_exclude'] = $this->sbp_options['js_exclude'];
237
+ $has_changed = true;
238
  }
239
 
240
  if ( $has_changed === true ) {
257
 
258
  public function update_pagespeed_tricker() {
259
  if ( sbp_get_option( 'pagespeed_tricker' ) && current_user_can( 'manage_options' ) ) {
260
+ $inject = SBP_WP_Config_Injector::inject_wp_config();
261
+
262
+ if ( $inject ) {
263
+ $this->sbp_options = get_option( 'sbp_options' );
264
+ $this->sbp_options['pagespeed_tricker'] = 0;
265
+ update_option( 'sbp_options', $this->sbp_options );
266
+ }
267
  }
268
  }
269
  }
includes/classes/class-sbp-wp-config-injector.php CHANGED
@@ -22,8 +22,10 @@ class SBP_WP_Config_Injector {
22
  }
23
  }
24
 
25
- self::remove_wp_config_lines();
26
- self::add_wp_config_lines();
 
 
27
  }
28
 
29
  public static function remove_wp_config_lines() {
@@ -40,7 +42,11 @@ class SBP_WP_Config_Injector {
40
  $modified_content = preg_replace( '/\/\/ END SBP_WP_Config' . PHP_EOL . '/si', '// END SBP_WP_Config', $modified_content ); // Remove blank lines
41
  $modified_content = preg_replace( '/\/\/ BEGIN SBP_WP_Config(.*?)\/\/ END SBP_WP_Config/si', '', $modified_content );
42
  $wp_filesystem->put_contents( $wp_config_file, $modified_content );
 
 
43
  }
 
 
44
  }
45
 
46
  private static function add_wp_config_lines() {
@@ -62,8 +68,12 @@ class SBP_WP_Config_Injector {
62
  }
63
  }
64
  delete_transient( 'sbp_wp_config_error' );
 
 
65
  } else {
66
  set_transient( 'sbp_wp_config_error', 1 );
67
  }
 
 
68
  }
69
  }
22
  }
23
  }
24
 
25
+ $removeLines = self::remove_wp_config_lines();
26
+ $addLines = self::add_wp_config_lines();
27
+
28
+ return $removeLines && $addLines;
29
  }
30
 
31
  public static function remove_wp_config_lines() {
42
  $modified_content = preg_replace( '/\/\/ END SBP_WP_Config' . PHP_EOL . '/si', '// END SBP_WP_Config', $modified_content ); // Remove blank lines
43
  $modified_content = preg_replace( '/\/\/ BEGIN SBP_WP_Config(.*?)\/\/ END SBP_WP_Config/si', '', $modified_content );
44
  $wp_filesystem->put_contents( $wp_config_file, $modified_content );
45
+
46
+ return true;
47
  }
48
+
49
+ return false;
50
  }
51
 
52
  private static function add_wp_config_lines() {
68
  }
69
  }
70
  delete_transient( 'sbp_wp_config_error' );
71
+
72
+ return true;
73
  } else {
74
  set_transient( 'sbp_wp_config_error', 1 );
75
  }
76
+
77
+ return false;
78
  }
79
  }
speed-booster-pack.php CHANGED
@@ -6,7 +6,7 @@
6
  * Plugin Name: Speed Booster Pack
7
  * Plugin URI: https://speedboosterpack.com
8
  * Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
9
- * Version: 4.3.2
10
  * Author: Optimocha
11
  * Author URI: https://optimocha.com
12
  * License: GPLv3 or later
@@ -32,7 +32,7 @@ define( 'SBP_PLUGIN_NAME', 'Speed Booster Pack' );
32
  /**
33
  * Current plugin version.
34
  */
35
- define( 'SBP_VERSION', '4.3.2' );
36
 
37
  /**
38
  * Plugin website URL.
6
  * Plugin Name: Speed Booster Pack
7
  * Plugin URI: https://speedboosterpack.com
8
  * Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
9
+ * Version: 4.3.3.1
10
  * Author: Optimocha
11
  * Author URI: https://optimocha.com
12
  * License: GPLv3 or later
32
  /**
33
  * Current plugin version.
34
  */
35
+ define( 'SBP_VERSION', '4.3.3.1' );
36
 
37
  /**
38
  * Plugin website URL.
templates/cache/advanced-cache.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  // check if request method is GET
4
  if ( ! isset($_SERVER['REQUEST_METHOD']) || $_SERVER['REQUEST_METHOD'] != 'GET') {
5
  return false;
1
  <?php
2
 
3
+ define( 'SBP_ADVANCED_CACHE', true );
4
+
5
  // check if request method is GET
6
  if ( ! isset($_SERVER['REQUEST_METHOD']) || $_SERVER['REQUEST_METHOD'] != 'GET') {
7
  return false;
vendor/codestar-framework/assets/images/wp-logo.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z"/></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z"/></g></g></svg>
vendor/codestar-framework/assets/images/wp-plugin-logo.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></g></svg>