P3 (Plugin Performance Profiler) - Version 1.1.1

Version Description

This release addresses a bug which which broke the UI on sites that used other plugins that contained an apostrophe in their name. Upgrading is recommended if you were affected by this bug.

Download this release

Release Info

Developer StarfieldTech
Plugin Icon wp plugin P3 (Plugin Performance Profiler)
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

class.p3-profile-table-sorter.php CHANGED
@@ -39,7 +39,7 @@ class P3_Profile_Table_Sorter {
39
  * @return array
40
  */
41
  public function sort( $direction = 'asc' ) {
42
- usort( &$this->data, array( $this, '_compare' ) );
43
  return ( 'asc' == $direction ) ? $this->data : array_reverse( $this->data );
44
  }
45
 
39
  * @return array
40
  */
41
  public function sort( $direction = 'asc' ) {
42
+ usort( $this->data, array( $this, '_compare' ) );
43
  return ( 'asc' == $direction ) ? $this->data : array_reverse( $this->data );
44
  }
45
 
p3-profiler.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: P3 (Plugin Performance Profiler)
4
  Plugin URI: http://support.godaddy.com/godaddy/wordpress-p3-plugin/
5
  Description: See which plugins are slowing down your site. Create a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.
6
  Author: GoDaddy.com
7
- Version: 1.1.0
8
  Author URI: http://www.godaddy.com/
9
  */
10
 
4
  Plugin URI: http://support.godaddy.com/godaddy/wordpress-p3-plugin/
5
  Description: See which plugins are slowing down your site. Create a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.
6
  Author: GoDaddy.com
7
+ Version: 1.1.1
8
  Author URI: http://www.godaddy.com/
9
  */
10
 
readme.txt CHANGED
@@ -2,15 +2,15 @@
2
  Contributors: Godaddy, StarfieldTech
3
  Tags: debug, debugging, developer, development, performance, plugin, profiler, speed
4
  Requires at least: 3.3
5
- Tested up to: 3.3
6
- Stable tag: 1.1.0
7
 
8
  See which plugins are slowing down your site. This plugin creates a performance report for your site.
9
 
10
  == Description ==
11
  This plugin creates a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.  Often times, WordPress sites load slowly because of poorly configured plugins or because there are so many of them. By using the P3 plugin, you can narrow down anything causing slowness on your site.
12
 
13
- This plugin uses the canvas element for drawing charts and requires requires Firefox, Chrome, Opera, Safari, or IE9 or later. Will not work in IE8 or lower.
14
 
15
  == Screenshots ==
16
 
@@ -18,10 +18,11 @@ This plugin uses the canvas element for drawing charts and requires requires Fir
18
  2. After profiling, you'll see a breakdown of relative runtime for each plugin.
19
  3. Callouts at the top give you quick information like how much load time (in seconds) is dedicated to plugins and how many database queries your site is running per page.
20
  4. The detailed timeline gives you timing information for every plugin, the theme, and the core for every page during the profile. Find out exactly what's happening on slow loading pages.
21
- 5. The query timeline gives you the number of database queries for every page during the profile. Find out which pages generate the most database queries.
22
- 6. Keep a history of your performance scans, compare your current performance with your previous performance.
23
- 7. Full in-app help documentation
24
- 8. Send a summary of your performance profile via e-mail. If you want to show your developer, site admin, hosting support, or a plugin developer what's going on with your site, this is good way to start the conversation.
 
25
 
26
  == Installation ==
27
  Automatic installation
@@ -42,6 +43,9 @@ Manual installation:
42
 
43
  == Upgrade Notice ==
44
 
 
 
 
45
  = 1.1.0 =
46
  Several usability enhancements and bugfixes.
47
 
@@ -60,6 +64,10 @@ Previous version of the plugin (before 1.1.0) did not have theme name detection
60
 
61
  == Changelog ==
62
 
 
 
 
 
63
  = 1.1.0 =
64
  * Including plugin usage percentage / seconds in e-mail report
65
  * Including theme name in e-mail report. Profiles created in older versions will show "unknown"
2
  Contributors: Godaddy, StarfieldTech
3
  Tags: debug, debugging, developer, development, performance, plugin, profiler, speed
4
  Requires at least: 3.3
5
+ Tested up to: 3.3.1
6
+ Stable tag: 1.1.1
7
 
8
  See which plugins are slowing down your site. This plugin creates a performance report for your site.
9
 
10
  == Description ==
11
  This plugin creates a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.  Often times, WordPress sites load slowly because of poorly configured plugins or because there are so many of them. By using the P3 plugin, you can narrow down anything causing slowness on your site.
12
 
13
+ This plugin uses the canvas element for drawing charts and requires requires Firefox, Chrome, Opera, Safari, or IE9 or later. This plugin will not work in IE8 or lower.
14
 
15
  == Screenshots ==
16
 
18
  2. After profiling, you'll see a breakdown of relative runtime for each plugin.
19
  3. Callouts at the top give you quick information like how much load time (in seconds) is dedicated to plugins and how many database queries your site is running per page.
20
  4. The detailed timeline gives you timing information for every plugin, the theme, and the core for every page during the profile. Find out exactly what's happening on slow loading pages.
21
+ 5. You can toggle each series on and off to customize this timeline for your precise needs.
22
+ 6. The query timeline gives you the number of database queries for every page during the profile. Find out which pages generate the most database queries.
23
+ 7. Keep a history of your performance scans, compare your current performance with your previous performance.
24
+ 8. Full in-app help documentation
25
+ 9. Send a summary of your performance profile via e-mail. If you want to show your developer, site admin, hosting support, or a plugin developer what's going on with your site, this is good way to start the conversation.
26
 
27
  == Installation ==
28
  Automatic installation
43
 
44
  == Upgrade Notice ==
45
 
46
+ = 1.1.1 =
47
+ This release addresses a bug which which broke the UI on sites that used other plugins that contained an apostrophe in their name. Upgrading is recommended if you were affected by this bug.
48
+
49
  = 1.1.0 =
50
  Several usability enhancements and bugfixes.
51
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.1.1 =
68
+ * Bugfix - Plugin names with apostrophes broke the UI
69
+ * Bugfix - Fix a deprecated warning with callt-ime pass by reference
70
+
71
  = 1.1.0 =
72
  * Including plugin usage percentage / seconds in e-mail report
73
  * Including theme name in e-mail report. Profiles created in older versions will show "unknown"
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png CHANGED
Binary file
screenshot-8.png CHANGED
Binary file
screenshot-9.png ADDED
Binary file
templates/view-scan.php CHANGED
@@ -94,14 +94,15 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
94
 
95
  // Send the data
96
  jQuery.post( ajaxurl, data, function( response ) {
97
- if ( "1" == response ) {
 
98
  $( "#p3-email-success-recipient" ).html( jQuery( '#p3-email-results-to' ).val() );
99
  $( "#p3-email-sending-success" ).show();
100
  $( "#p3-email-sending-error" ).hide();
101
  $( "#p3-email-sending-loading" ).hide();
102
  $( "#p3-email-sending-close" ).show();
103
  } else {
104
- if ( "-1" == response ) {
105
  $( "#p3-email-error" ).html( "nonce error" );
106
  } else if ( "0" == response.charAt( 0 ) ) {
107
  $( "#p3-email-error" ).html( response.substr( 2 ) );
@@ -167,7 +168,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
167
  <?php if ( !empty( $profile ) ){ ?>
168
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
169
  {
170
- label: "<?php echo $k; ?>",
171
  data: <?php echo $v; ?>
172
  },
173
  <?php } ?>
@@ -405,7 +406,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
405
 
406
 
407
  /**************************************************************/
408
- /** Compnent bar chart data **/
409
  /**************************************************************/
410
  var chart_<?php echo $component_breakdown_chart_id; ?> = null;
411
  var data_<?php echo $component_breakdown_chart_id; ?> = [
@@ -435,7 +436,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
435
  <?php $i = 2; $other = 0; ?>
436
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
437
  {
438
- label: '<?php echo $k; ?>',
439
  data: [[
440
  <?php echo $i++; ?>,
441
  <?php echo $v; ?>
@@ -475,7 +476,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
475
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
476
  [
477
  <?php echo $i++ ?>,
478
- '<?php echo $k; ?>'
479
  ],
480
  <?php } ?>
481
  ],
@@ -551,7 +552,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
551
  <?php if ( !empty( $profile ) && !empty( $profile->detected_plugins ) ) { ?>
552
  <?php foreach ( $profile->detected_plugins as $plugin ) { ?>
553
  {
554
- label: "<?php echo $plugin; ?>",
555
  data: [
556
  <?php foreach ( array_values( $url_stats ) as $k => $v ) { ?>
557
  <?php if ( array_key_exists( $plugin, $v['breakdown'] ) ) { ?>
@@ -574,7 +575,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
574
  jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="WP Core Time" />WP Core Time</label></div>' );
575
  jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="Theme" />Theme</label></div>' );
576
  <?php foreach ( $profile->detected_plugins as $plugin ) { ?>
577
- jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="<?php echo $plugin; ?>" /><?php echo $plugin ;?></label></div>' );
578
  <?php } ?>
579
  <?php } ?>
580
  jQuery( "input.p3-detailed-series-toggle" ).click( function() {
@@ -1051,7 +1052,7 @@ to share the results with you. Please take a look at the information below:</te
1051
  echo "\nPlugin list:\n";
1052
  echo "===========================================\n";
1053
  foreach ( $profile->plugin_times as $k => $v) {
1054
- echo $k . ' - ' . sprintf('%.4f sec', $v) . ' - ' . sprintf( '%.2f%%', $v * 100 / array_sum( $profile->plugin_times ) ) . "\n";
1055
  }
1056
  ?></textarea>
1057
  </div>
94
 
95
  // Send the data
96
  jQuery.post( ajaxurl, data, function( response ) {
97
+ response = response.trim();
98
+ if ( "1" == response.substring( 0, 1 ) ) {
99
  $( "#p3-email-success-recipient" ).html( jQuery( '#p3-email-results-to' ).val() );
100
  $( "#p3-email-sending-success" ).show();
101
  $( "#p3-email-sending-error" ).hide();
102
  $( "#p3-email-sending-loading" ).hide();
103
  $( "#p3-email-sending-close" ).show();
104
  } else {
105
+ if ( "-1" == response.substring( 0, 2 ) ) {
106
  $( "#p3-email-error" ).html( "nonce error" );
107
  } else if ( "0" == response.charAt( 0 ) ) {
108
  $( "#p3-email-error" ).html( response.substr( 2 ) );
168
  <?php if ( !empty( $profile ) ){ ?>
169
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
170
  {
171
+ label: "<?php echo esc_js( $k ); ?>",
172
  data: <?php echo $v; ?>
173
  },
174
  <?php } ?>
406
 
407
 
408
  /**************************************************************/
409
+ /** Component bar chart data **/
410
  /**************************************************************/
411
  var chart_<?php echo $component_breakdown_chart_id; ?> = null;
412
  var data_<?php echo $component_breakdown_chart_id; ?> = [
436
  <?php $i = 2; $other = 0; ?>
437
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
438
  {
439
+ label: '<?php echo esc_js( $k ); ?>',
440
  data: [[
441
  <?php echo $i++; ?>,
442
  <?php echo $v; ?>
476
  <?php foreach ( $profile->plugin_times as $k => $v ) { ?>
477
  [
478
  <?php echo $i++ ?>,
479
+ '<?php echo esc_js( $k ); ?>'
480
  ],
481
  <?php } ?>
482
  ],
552
  <?php if ( !empty( $profile ) && !empty( $profile->detected_plugins ) ) { ?>
553
  <?php foreach ( $profile->detected_plugins as $plugin ) { ?>
554
  {
555
+ label: "<?php echo esc_js( $plugin ); ?>",
556
  data: [
557
  <?php foreach ( array_values( $url_stats ) as $k => $v ) { ?>
558
  <?php if ( array_key_exists( $plugin, $v['breakdown'] ) ) { ?>
575
  jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="WP Core Time" />WP Core Time</label></div>' );
576
  jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="Theme" />Theme</label></div>' );
577
  <?php foreach ( $profile->detected_plugins as $plugin ) { ?>
578
+ jQuery( "#p3-detailed-series-toggle" ).append( '<div><label><input type="checkbox" checked="checked" class="p3-detailed-series-toggle" data-key="<?php echo esc_html( $plugin ); ?>" /><?php echo esc_html( $plugin ); ?></label></div>' );
579
  <?php } ?>
580
  <?php } ?>
581
  jQuery( "input.p3-detailed-series-toggle" ).click( function() {
1052
  echo "\nPlugin list:\n";
1053
  echo "===========================================\n";
1054
  foreach ( $profile->plugin_times as $k => $v) {
1055
+ echo esc_html( $k ) . ' - ' . sprintf('%.4f sec', $v) . ' - ' . sprintf( '%.2f%%', $v * 100 / array_sum( $profile->plugin_times ) ) . "\n";
1056
  }
1057
  ?></textarea>
1058
  </div>