WP Performance Score Booster - Version 2.1

Version Description

= 2.0 = This version adds support for page preloading, improves compression and caching rules for faster speed, and has newly designed settings page. Recommended upgrade.

Download this release

Release Info

Developer dipakcg
Plugin Icon 128x128 WP Performance Score Booster
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

admin-page.php CHANGED
@@ -106,10 +106,9 @@ function wppsb_admin_options() {
106
  <div class="updated" id='update-applied'><p><strong><?php _e( '<strong>WP Performance Score Booster - Update applied successfully!</strong>', 'wp-performance-score-booster' ); ?></strong></p></div>
107
  <?php
108
  }
109
-
110
- // See if the user has posted us some information
111
- // If they did, this hidden field will be set to 'Y'
112
- if( isset( $_POST[$hidden_field_name] ) && $_POST[$hidden_field_name] == 'Y' ) {
113
 
114
  if ( isset($_GET['update-applied']) && $_GET['update-applied'] == 'true' ) {
115
  ?>
@@ -132,17 +131,17 @@ function wppsb_admin_options() {
132
  update_option( $instant_page_preload, $instant_page_preload_val );
133
 
134
  flush_rewrite_rules();
135
- wppsb_save_mod_rewrite_rules($enable_gzip_val, $expire_caching_val);
136
 
137
  // Put the settings updated message on the screen
138
  ?>
139
  <div class="updated"><p><strong><?php _e( '<strong>Settings Saved.</strong>', 'wp-performance-score-booster' ); ?></strong></p></div>
140
  <?php
141
  }
142
- ?>
143
 
144
  <form method="post" name="options_form">
145
- <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
146
  <table>
147
 
148
  <!-- Remove Query String -->
@@ -246,7 +245,7 @@ function wppsb_admin_options() {
246
  -->
247
 
248
  </table>
249
- <p><input id='wppsb_save_button' type="submit" value="<?php esc_attr_e('Save Changes', 'wp-performance-score-booster'); ?>" class="button button-primary" name="submit" /></p>
250
  </form>
251
  </td>
252
 
@@ -258,7 +257,7 @@ function wppsb_admin_options() {
258
  <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-rate-this-16x16.png' . '" width="16" height="16" > '; ?> <a href="//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post" target="_blank"> <?php _e('Rate this plugin on WordPress', 'wp-performance-score-booster'); ?> </a> </span>
259
  <!-- <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-wordpress-16x16.png' . '" width="16" height="16" > '; ?> <a href="//wordpress.org/support/plugin/wp-performance-score-booster" target="_blank"> <?php _e('Get FREE support on WordPress', 'wp-performance-score-booster'); ?> </a> </span> -->
260
  <!-- <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-other-plugins-16x16.png' . '" > '; ?> <a href="//profiles.wordpress.org/dipakcg#content-plugins" target="_blank"> <?php _e('Get my other plugins', 'wp-performance-score-booster'); ?> </a> </span> -->
261
- <span id="td_section" class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-icon-24x24.png' . '" width="16" height="16" > '; ?> <a href="//dipakgajjar.com/product/wordpress-speed-optimization-service/" target="_blank"> <?php _e('Order Speed Optimisation Service', 'wp-performance-score-booster'); ?> </a> </span>
262
  <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-twitter-16x16.png' . '" width="16" height="16" > '; ?> <a href="//twitter.com/dipakcgajjar" target="_blank"> <?php _e('Let\'s connect on Twitter: @dipakcgajjar', 'wp-performance-score-booster'); ?> </a> </span>
263
  <span id="td_section" class="wppsb_admin_dev_sidebar" style="float: right;"> <?php _e('Version:', 'wp-performance-score-booster'); ?> <strong> <?php echo $wppsb_plugin_version; ?> </strong> </span>
264
  </div>
106
  <div class="updated" id='update-applied'><p><strong><?php _e( '<strong>WP Performance Score Booster - Update applied successfully!</strong>', 'wp-performance-score-booster' ); ?></strong></p></div>
107
  <?php
108
  }
109
+
110
+ // CSRF Check
111
+ if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'wppsb_settings_nonce' ) ) {
 
112
 
113
  if ( isset($_GET['update-applied']) && $_GET['update-applied'] == 'true' ) {
114
  ?>
131
  update_option( $instant_page_preload, $instant_page_preload_val );
132
 
133
  flush_rewrite_rules();
134
+ wppsb_save_mod_rewrite_rules( $enable_gzip_val, $expire_caching_val );
135
 
136
  // Put the settings updated message on the screen
137
  ?>
138
  <div class="updated"><p><strong><?php _e( '<strong>Settings Saved.</strong>', 'wp-performance-score-booster' ); ?></strong></p></div>
139
  <?php
140
  }
141
+ ?>
142
 
143
  <form method="post" name="options_form">
144
+ <?php wp_nonce_field( 'wppsb_settings_nonce' ); ?>
145
  <table>
146
 
147
  <!-- Remove Query String -->
245
  -->
246
 
247
  </table>
248
+ <p><input id='wppsb_save_button' type="submit" value="<?php esc_attr_e('Save Changes', 'wp-performance-score-booster'); ?>" class="button button-primary" name="submit" /></p>
249
  </form>
250
  </td>
251
 
257
  <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-rate-this-16x16.png' . '" width="16" height="16" > '; ?> <a href="//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post" target="_blank"> <?php _e('Rate this plugin on WordPress', 'wp-performance-score-booster'); ?> </a> </span>
258
  <!-- <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-wordpress-16x16.png' . '" width="16" height="16" > '; ?> <a href="//wordpress.org/support/plugin/wp-performance-score-booster" target="_blank"> <?php _e('Get FREE support on WordPress', 'wp-performance-score-booster'); ?> </a> </span> -->
259
  <!-- <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-other-plugins-16x16.png' . '" > '; ?> <a href="//profiles.wordpress.org/dipakcg#content-plugins" target="_blank"> <?php _e('Get my other plugins', 'wp-performance-score-booster'); ?> </a> </span> -->
260
+ <span id="td_section" class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-icon-24x24.png' . '" width="16" height="16" > '; ?> <a href="//dipakgajjar.com/product/wordpress-speed-optimization-service/" target="_blank"> <?php _e('Order Speed Optimization Service', 'wp-performance-score-booster'); ?> </a> </span>
261
  <span class="wppsb_admin_dev_sidebar"> <?php echo '<img src="' . WPPSB_URL . '/assets/images/wppsb-twitter-16x16.png' . '" width="16" height="16" > '; ?> <a href="//twitter.com/dipakcgajjar" target="_blank"> <?php _e('Let\'s connect on Twitter: @dipakcgajjar', 'wp-performance-score-booster'); ?> </a> </span>
262
  <span id="td_section" class="wppsb_admin_dev_sidebar" style="float: right;"> <?php _e('Version:', 'wp-performance-score-booster'); ?> <strong> <?php echo $wppsb_plugin_version; ?> </strong> </span>
263
  </div>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
5
  Requires at least: 3.5
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 2.0
9
  License: GPLv2 or later
10
 
11
  Make website faster, speed up page load time and improve performance scores in services like GTmetrix, Pingdom, YSlow and PageSpeed.
@@ -69,6 +69,9 @@ If this plugin has helped you in any way, you can:
69
  1. Admin Settings
70
 
71
  == Changelog ==
 
 
 
72
  = 2.0, November 02, 2020 =
73
  * New: Redesigned settings page
74
  * New: Instant.page preloader that preload a page (on mouse hover) right before a user click on a link
5
  Requires at least: 3.5
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 2.1
9
  License: GPLv2 or later
10
 
11
  Make website faster, speed up page load time and improve performance scores in services like GTmetrix, Pingdom, YSlow and PageSpeed.
69
  1. Admin Settings
70
 
71
  == Changelog ==
72
+ = 2.1, October 12, 2021 =
73
+ * Improve: CSRF Check
74
+
75
  = 2.0, November 02, 2020 =
76
  * New: Redesigned settings page
77
  * New: Instant.page preloader that preload a page (on mouse hover) right before a user click on a link
wp-performance-score-booster.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Performance Score Booster
4
  Plugin URI: https://github.com/dipakcg/wp-performance-score-booster
5
  Description: Makes website faster, speeds up page load time, and instantly improves website performance scores in services like GTmetrix, Pingdom, YSlow, and PageSpeed.
6
- Version: 2.0
7
  Author: Dipak C. Gajjar
8
  Author URI: https://dipakgajjar.com
9
  License: GPL-2.0+
@@ -14,14 +14,12 @@ Contributors: dipakcg (for wordpress.org submission)
14
  // Exit if accessed directly.
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
17
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
18
-
19
  include_once ( ABSPATH . 'wp-admin/includes/file.php' ); // to get get_home_path() function work
20
  include_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); // to is_plugin_active()() function work
21
 
22
  // Define plugin version for future releases
23
  if ( ! defined( 'WPPSB_PLUGIN_VERSION' ) ) {
24
- define( 'WPPSB_PLUGIN_VERSION', '2.0' );
25
  }
26
 
27
  if ( ! defined( 'WPPSB_BASE' ) ) {
@@ -110,7 +108,7 @@ function wppsb_plugin_meta_links( $links, $file ) {
110
  if ( $file === plugin_basename(__FILE__) ) {
111
  return array_merge(
112
  $links,
113
- array( '<a href="https://dipakgajjar.com/products/wordpress-speed-optimization-service?utm_source=plugins%20page&utm_medium=text%20link&utm_campaign=wordplress%20plugins" style="color:#FF0000;" target="_blank">Order WordPress Speed Optimisation Service</a>' )
114
  );
115
  }
116
  return $links;
3
  Plugin Name: WP Performance Score Booster
4
  Plugin URI: https://github.com/dipakcg/wp-performance-score-booster
5
  Description: Makes website faster, speeds up page load time, and instantly improves website performance scores in services like GTmetrix, Pingdom, YSlow, and PageSpeed.
6
+ Version: 2.1
7
  Author: Dipak C. Gajjar
8
  Author URI: https://dipakgajjar.com
9
  License: GPL-2.0+
14
  // Exit if accessed directly.
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
 
 
17
  include_once ( ABSPATH . 'wp-admin/includes/file.php' ); // to get get_home_path() function work
18
  include_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); // to is_plugin_active()() function work
19
 
20
  // Define plugin version for future releases
21
  if ( ! defined( 'WPPSB_PLUGIN_VERSION' ) ) {
22
+ define( 'WPPSB_PLUGIN_VERSION', '2.1' );
23
  }
24
 
25
  if ( ! defined( 'WPPSB_BASE' ) ) {
108
  if ( $file === plugin_basename(__FILE__) ) {
109
  return array_merge(
110
  $links,
111
+ array( '<a href="https://dipakgajjar.com/product/wordpress-speed-optimization-service?utm_source=plugins%20page&utm_medium=text%20link&utm_campaign=wppsb%20plugin" style="color:#FF0000;" target="_blank">Improve your site\'s performance even more!</a>' )
112
  );
113
  }
114
  return $links;