P3 (Plugin Performance Profiler) - Version 1.5.0

Version Description

Avoid a race condition on NFS systems. Also fix PHP strict notices and stylesheet conflict with MP6/3.8 admin theme.

Download this release

Release Info

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

Code changes from version 1.4.1 to 1.5.0

classes/class.p3-profiler-plugin-admin.php CHANGED
@@ -169,7 +169,7 @@ class P3_Profiler_Plugin_Admin {
169
 
170
  // Usability message
171
  if ( !defined( 'WPP_PROFILING_STARTED' ) ) {
172
- echo '<div class="updated"><p>' . __( 'Click "Start Scan" to run a performance scan of your website.', 'p3-profiler' ) . '</p></div>';
173
  }
174
 
175
  // Load the list table, let it handle any bulk actions
@@ -271,7 +271,7 @@ class P3_Profiler_Plugin_Admin {
271
  $filename = sanitize_file_name( basename( $_POST['p3_scan_name'] ) );
272
 
273
  // Add the entry ( multisite installs can run more than one concurrent profile )
274
- delete_transient( 'p3_profiler-error_detection' );
275
  $opts = get_option( 'p3-profiler_options' );
276
  $opts['profiling_enabled'] = array(
277
  'ip' => stripslashes( $_POST['p3_ip'] ),
@@ -506,7 +506,6 @@ class P3_Profiler_Plugin_Admin {
506
 
507
  /**
508
  * Add a notices
509
- * @uses transients
510
  * @param string $notice
511
  * @param bool $error Default false. If true, this is a red error. If false, this is a yellow notice.
512
  * @return void
@@ -514,7 +513,7 @@ class P3_Profiler_Plugin_Admin {
514
  public static function add_notice( $notice, $error = false ) {
515
 
516
  // Get any notices on the stack
517
- $notices = get_transient( 'p3_notices' );
518
  if ( empty( $notices ) ) {
519
  $notices = array();
520
  }
@@ -526,23 +525,22 @@ class P3_Profiler_Plugin_Admin {
526
  );
527
 
528
  // Save the stack
529
- set_transient( 'p3_notices', $notices );
530
  }
531
 
532
  /**
533
  * Display notices
534
- * @uses transients
535
  * @return voide
536
  */
537
  public static function show_notices() {
538
- $notices = get_transient( 'p3_notices' );
539
  if ( !empty( $notices ) ) {
540
  $notices = array_unique( $notices );
541
  foreach ( $notices as $notice ) {
542
  echo '<div class="' . ( ( $notice['error'] ) ? 'error' : 'updated' ) . '"><p>' . htmlentities( $notice['msg'] ) . '</p></div>';
543
  }
544
  }
545
- set_transient( 'p3_notices', array() );
546
  if ( false !== self::scan_enabled() ) {
547
  echo '<div class="updated"><p>' . __( 'Performance scanning is enabled.', 'p3-profiler' ) . '</p></div>';
548
  }
@@ -691,9 +689,14 @@ class P3_Profiler_Plugin_Admin {
691
  delete_option( 'p3-profiler_profiling_enabled' );
692
  }
693
 
 
 
 
 
 
694
  // Ensure the profiles folder is there
695
  $uploads_dir = wp_upload_dir();
696
  $folder = $uploads_dir['basedir'] . DIRECTORY_SEPARATOR . 'profiles';
697
  self::make_profiles_folder( $folder );
698
- }
699
  }
169
 
170
  // Usability message
171
  if ( !defined( 'WPP_PROFILING_STARTED' ) ) {
172
+ echo '<div class="updated usability-msg"><p>' . __( 'Click "Start Scan" to run a performance scan of your website.', 'p3-profiler' ) . '</p></div>';
173
  }
174
 
175
  // Load the list table, let it handle any bulk actions
271
  $filename = sanitize_file_name( basename( $_POST['p3_scan_name'] ) );
272
 
273
  // Add the entry ( multisite installs can run more than one concurrent profile )
274
+ delete_option( 'p3_profiler-error_detection' );
275
  $opts = get_option( 'p3-profiler_options' );
276
  $opts['profiling_enabled'] = array(
277
  'ip' => stripslashes( $_POST['p3_ip'] ),
506
 
507
  /**
508
  * Add a notices
 
509
  * @param string $notice
510
  * @param bool $error Default false. If true, this is a red error. If false, this is a yellow notice.
511
  * @return void
513
  public static function add_notice( $notice, $error = false ) {
514
 
515
  // Get any notices on the stack
516
+ $notices = get_option( 'p3_notices' );
517
  if ( empty( $notices ) ) {
518
  $notices = array();
519
  }
525
  );
526
 
527
  // Save the stack
528
+ update_option( 'p3_notices', $notices );
529
  }
530
 
531
  /**
532
  * Display notices
 
533
  * @return voide
534
  */
535
  public static function show_notices() {
536
+ $notices = get_option( 'p3_notices' );
537
  if ( !empty( $notices ) ) {
538
  $notices = array_unique( $notices );
539
  foreach ( $notices as $notice ) {
540
  echo '<div class="' . ( ( $notice['error'] ) ? 'error' : 'updated' ) . '"><p>' . htmlentities( $notice['msg'] ) . '</p></div>';
541
  }
542
  }
543
+ update_option( 'p3_notices', array() );
544
  if ( false !== self::scan_enabled() ) {
545
  echo '<div class="updated"><p>' . __( 'Performance scanning is enabled.', 'p3-profiler' ) . '</p></div>';
546
  }
689
  delete_option( 'p3-profiler_profiling_enabled' );
690
  }
691
 
692
+ // Upgrading from < 1.5.0
693
+ if ( empty( $version) || version_compare( $version, '1.5.0' ) < 0 ) {
694
+ update_option( 'p3-profiler_version', '1.3.0' );
695
+ }
696
+
697
  // Ensure the profiles folder is there
698
  $uploads_dir = wp_upload_dir();
699
  $folder = $uploads_dir['basedir'] . DIRECTORY_SEPARATOR . 'profiles';
700
  self::make_profiles_folder( $folder );
701
+ }
702
  }
classes/class.p3-profiler-table.php CHANGED
@@ -216,7 +216,7 @@ class P3_Profiler_Table extends WP_List_Table {
216
  }
217
  }
218
  $count = count( $_REQUEST['scan'] );
219
- echo '<div class="updated"><p>'
220
  . sprintf( _n( 'Deleted %d scan. ', 'Deleted %d scans.' , $count, 'p3-profiler' ), $count )
221
  . '</p></div>';
222
  }
216
  }
217
  }
218
  $count = count( $_REQUEST['scan'] );
219
+ echo '<div class="updated delete-msg"><p>'
220
  . sprintf( _n( 'Deleted %d scan. ', 'Deleted %d scans.' , $count, 'p3-profiler' ), $count )
221
  . '</p></div>';
222
  }
classes/class.p3-profiler.php CHANGED
@@ -169,10 +169,10 @@ class P3_Profiler {
169
  }
170
 
171
  // Error detection
172
- $flag = get_transient( 'p3_profiler-error_detection' );
173
  if ( !empty( $flag ) ) {
174
  p3_profiler_disable();
175
- delete_transient( 'p3_profiler-error_detection' );
176
  return $this;
177
  }
178
 
@@ -183,7 +183,7 @@ class P3_Profiler {
183
  @set_time_limit( 90 );
184
 
185
  // Set the error detection flag
186
- set_transient( 'p3_profiler-error_detection', time() );
187
 
188
  // Set the profile file
189
  $this->_profile_filename = $opts['profiling_enabled']['name'] . '.json';
@@ -507,9 +507,9 @@ class P3_Profiler {
507
  // Detect fatal errors (e.g. out of memory errors)
508
  $error = error_get_last();
509
  if ( empty( $error ) || E_ERROR !== $error['type'] ) {
510
- delete_transient( 'p3_profiler-error_detection' );
511
  } else {
512
- set_transient( 'p3_notices', array( array(
513
  'msg' => sprintf( __( 'A fatal error occurred during profiling: %s in file %s on line %d ', 'p3-profiler' ), $error['message'], $error['file'], $error['line'] ),
514
  'error' => true,
515
  ) ) );
@@ -618,9 +618,12 @@ class P3_Profiler {
618
  unset( $this->_profile['stack'] );
619
 
620
  // Write the profile file
621
- $uploads_dir = wp_upload_dir();
622
- $path = $uploads_dir['basedir'] . DIRECTORY_SEPARATOR . 'profiles' . DIRECTORY_SEPARATOR . $this->_profile_filename;
623
- file_put_contents( $path, json_encode( $this->_profile ) . PHP_EOL, FILE_APPEND );
 
 
 
624
  }
625
 
626
  /**
169
  }
170
 
171
  // Error detection
172
+ $flag = get_option( 'p3_profiler-error_detection' );
173
  if ( !empty( $flag ) ) {
174
  p3_profiler_disable();
175
+ delete_option( 'p3_profiler-error_detection' );
176
  return $this;
177
  }
178
 
183
  @set_time_limit( 90 );
184
 
185
  // Set the error detection flag
186
+ update_option( 'p3_profiler-error_detection', time() );
187
 
188
  // Set the profile file
189
  $this->_profile_filename = $opts['profiling_enabled']['name'] . '.json';
507
  // Detect fatal errors (e.g. out of memory errors)
508
  $error = error_get_last();
509
  if ( empty( $error ) || E_ERROR !== $error['type'] ) {
510
+ delete_option( 'p3_profiler-error_detection' );
511
  } else {
512
+ update_option( 'p3_notices', array( array(
513
  'msg' => sprintf( __( 'A fatal error occurred during profiling: %s in file %s on line %d ', 'p3-profiler' ), $error['message'], $error['file'], $error['line'] ),
514
  'error' => true,
515
  ) ) );
618
  unset( $this->_profile['stack'] );
619
 
620
  // Write the profile file
621
+ $transient = get_option( 'p3_scan_' . $opts['profiling_enabled']['name'] );
622
+ if ( false === $transient ) {
623
+ $transient = '';
624
+ }
625
+ $transient .= json_encode( $this->_profile ) . PHP_EOL;
626
+ update_option( 'p3_scan_' . $opts['profiling_enabled']['name'], $transient );
627
  }
628
 
629
  /**
css/p3.css CHANGED
@@ -384,4 +384,9 @@ div#p3-reminder-wrapper {
384
  padding: 8px 4px 0px 4px;
385
  text-align: center;
386
  background-color: #f0f8fe;
387
- }
 
 
 
 
 
384
  padding: 8px 4px 0px 4px;
385
  text-align: center;
386
  background-color: #f0f8fe;
387
+ }
388
+
389
+ /** http://wordpress.org/support/topic/plugin-broken-with-wp-371?replies=14#post-4976803 **/
390
+ .ui-front {
391
+ z-index: 100 !important;
392
+ }
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.4.1
8
  Author URI: http://www.godaddy.com/
9
  Text Domain: p3-profiler
10
  Domain Path: /languages
@@ -53,7 +53,7 @@ require_once P3_PATH . '/start-profile.php';
53
  /**************************************************************************/
54
 
55
  // Ajax actions
56
- if ( is_admin() && 'admin-ajax.php' == end( explode( '/', $_SERVER['PHP_SELF'] ) ) ) {
57
 
58
  add_action( 'admin_init', array( 'P3_Profiler_Plugin_Admin', 'set_path' ) );
59
  add_action( 'wp_ajax_p3_start_scan', array( 'P3_Profiler_Plugin_Admin', 'ajax_start_scan' ) );
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.5.0
8
  Author URI: http://www.godaddy.com/
9
  Text Domain: p3-profiler
10
  Domain Path: /languages
53
  /**************************************************************************/
54
 
55
  // Ajax actions
56
+ if ( is_admin() && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
57
 
58
  add_action( 'admin_init', array( 'P3_Profiler_Plugin_Admin', 'set_path' ) );
59
  add_action( 'wp_ajax_p3_start_scan', array( 'P3_Profiler_Plugin_Admin', 'ajax_start_scan' ) );
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === P3 (Plugin Performance Profiler) ===
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.5
6
- Stable tag: 1.4.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -47,6 +47,9 @@ Manual installation:
47
 
48
  == Upgrade Notice ==
49
 
 
 
 
50
  = 1.4.1 =
51
  Fixed 2 php notices and removed a reference to a missing stylesheet.
52
 
@@ -137,6 +140,14 @@ add_filter( 'p3_automatic_scan_urls', 'my_p3_auto_scan_pages' );
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
 
140
  = 1.4.1 =
141
  * Fixed a logged php notice during uninstall
142
  * Fixed a php notice when starting scan. props rrhobbs
1
  === P3 (Plugin Performance Profiler) ===
2
+ Contributors: Godaddy, StarfieldTech, kurtpayne
3
  Tags: debug, debugging, developer, development, performance, plugin, profiler, speed
4
  Requires at least: 3.3
5
+ Tested up to: 3.9
6
+ Stable tag: 1.5.0
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
47
 
48
  == Upgrade Notice ==
49
 
50
+ = 1.5.0 =
51
+ Avoid a race condition on NFS systems. Also fix PHP strict notices and stylesheet conflict with MP6/3.8 admin theme.
52
+
53
  = 1.4.1 =
54
  Fixed 2 php notices and removed a reference to a missing stylesheet.
55
 
140
 
141
  == Changelog ==
142
 
143
+ = 1.5.0 =
144
+ * Fixed a CSS compatibility issue between WordPress 3.8 / MP6 and jQuery UI (props mintfactory)
145
+
146
+ = 1.4.2 =
147
+ * Fixed a php short tag. Props Dean Taylor
148
+ * Fixed an E_STRICT notice. Props Dean Taylor
149
+ * Fixed an issue with debug_backtrace that broke with php 5.2.4. Props tobbykanin
150
+
151
  = 1.4.1 =
152
  * Fixed a logged php notice during uninstall
153
  * Fixed a php notice when starting scan. props rrhobbs
start-profile.php CHANGED
@@ -43,6 +43,14 @@ function p3_profiler_get_ip() {
43
  */
44
  function p3_profiler_disable() {
45
  $opts = get_option( 'p3-profiler_options' );
 
 
 
 
 
 
 
 
46
  $opts['profiling_enabled'] = false;
47
  update_option( 'p3-profiler_options', $opts );
48
  }
43
  */
44
  function p3_profiler_disable() {
45
  $opts = get_option( 'p3-profiler_options' );
46
+ $uploads_dir = wp_upload_dir();
47
+ $path = $uploads_dir['basedir'] . DIRECTORY_SEPARATOR . 'profiles' . DIRECTORY_SEPARATOR . $opts['profiling_enabled']['name'] . '.json';
48
+ $transient = get_option( 'p3_scan_' . $opts['profiling_enabled']['name'] );
49
+ if ( false === $transient ) {
50
+ $transient = '';
51
+ }
52
+ file_put_contents( $path, $transient );
53
+ delete_option( 'p3_scan_' . $opts['profiling_enabled']['name'], $transient );
54
  $opts['profiling_enabled'] = false;
55
  update_option( 'p3-profiler_options', $opts );
56
  }
templates/callouts.php CHANGED
@@ -485,7 +485,7 @@ $opts = get_option( 'p3-profiler_options' );
485
  <?php echo wp_nonce_field( 'p3_ajax_start_scan', 'p3_nonce' ); ?>
486
  <strong><?php _e( 'My IP:', 'p3-profiler' ); ?></strong><?php echo htmlentities( p3_profiler_get_ip() ); ?>
487
  <div class="p3-big-button"><input type="checkbox" checked="checked" id="p3-start-scan-submit" />
488
- <label for="p3-start-scan-submit"><?php _e( 'Start Scan', 'p3-profiler' ); ?></label></div>
489
  <a href="javascript:;" id="p3-advanced-settings"><?php _e( 'Advanced Settings', 'p3-profiler' ); ?></a>
490
 
491
  <?php } ?>
@@ -494,10 +494,10 @@ $opts = get_option( 'p3-profiler_options' );
494
 
495
  <!-- First callout cell -->
496
  <td class="p3-callout">
497
- <div class="p3-callout-outer-wrapper qtip-tip" title="<?php esc_attr_e( 'Total number of active plugins, including must-use plugins, on your site.', 'p3-profiler' ); ?>">
498
  <div class="p3-callout-inner-wrapper">
499
- <div class="p3-callout-caption"><?php _e( 'Total Plugins:', 'p3-profiler' ); ?></div>
500
- <div class="p3-callout-data">
501
  <?php
502
  // Get the total number of plugins
503
  $active_plugins = count( get_mu_plugins() );
@@ -509,61 +509,61 @@ $opts = get_option( 'p3-profiler_options' );
509
  echo $active_plugins;
510
  ?>
511
  </div>
512
- <div class="p3-callout-caption">(<?php _e( 'currently active', 'p3-profiler' ); ?>)</div>
513
  </div>
514
  </div>
515
  </td>
516
 
517
  <!-- Second callout cell -->
518
  <td class="p3-callout">
519
- <div class="p3-callout-outer-wrapper qtip-tip" title="<?php esc_attr_e( 'Total number of seconds dedicated to plugin code per visit on your site.', 'p3-profiler' ); ?>"
520
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
521
  <div class="p3-callout-inner-wrapper">
522
- <div class="p3-callout-caption"><?php _e( 'Plugin Load Time', 'p3-profiler' ); ?></div>
523
- <div class="p3-callout-data">
524
  <?php if ( null === self::$profile ) { ?>
525
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
526
  <?php } else { ?>
527
  <?php printf( '%.3f', self::$profile->averages['plugins'] ); ?>
528
  <?php } ?>
529
  </div>
530
- <div class="p3-callout-caption">(<?php _e( 'sec. per visit', 'p3-profiler' ); ?>)</div>
531
  </div>
532
  </div>
533
  </td>
534
 
535
  <!-- Third callout cell -->
536
  <td class="p3-callout">
537
- <div class="p3-callout-outer-wrapper qtip-tip" title="<?php esc_attr_e( 'Percent of load time on your site dedicated to plugin code', 'p3-profiler' ); ?>"
538
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
539
  <div class="p3-callout-inner-wrapper">
540
- <div class="p3-callout-caption"><?php _e( 'Plugin Impact', 'p3-profiler' ); ?></div>
541
- <div class="p3-callout-data">
542
  <?php if ( null === self::$profile ) { ?>
543
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
544
  <?php } else { ?>
545
  <?php printf( '%.1f%%', self::$profile->averages['plugin_impact'] ); ?>
546
  <?php } ?>
547
  </div>
548
- <div class="p3-callout-caption">(<?php _e( 'of page load time', 'p3-profiler' ); ?>)</div>
549
  </div>
550
  </div>
551
  </td>
552
 
553
  <!-- Fourth callout cell -->
554
  <td class="p3-callout">
555
- <div class="p3-callout-outer-wrapper qtip-tip" title="<?php esc_attr_e( 'Total number of database queries per visit', 'p3-profiler' ); ?>"
556
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
557
  <div class="p3-callout-inner-wrapper">
558
- <div class="p3-callout-caption"><?php _e( 'MySQL Queries', 'p3-profiler' ); ?></div>
559
- <div class="p3-callout-data">
560
  <?php if ( null === self::$profile ) { ?>
561
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
562
  <?php } else { ?>
563
  <?php echo round( self::$profile->averages['queries'] ); ?>
564
  <?php } ?>
565
  </div>
566
- <div class="p3-callout-caption"><?php _e( 'per visit', 'p3-profiler' ); ?></div>
567
  </div>
568
  </div>
569
  </td>
@@ -573,37 +573,37 @@ $opts = get_option( 'p3-profiler_options' );
573
 
574
  <!-- Dialog for IP settings -->
575
  <div id="p3-ip-dialog" class="p3-dialog">
576
- <div>
577
  <?php _e( 'IP address or pattern:', 'p3-profiler' ); ?><br /><br />
578
  <input type="checkbox" id="p3-use-current-ip" <?php if ( true == $opts['use_current_ip'] ) : ?>checked="checked"<?php endif; ?> />
579
  <label for="p3-use-current-ip"><?php _e( 'Use my IP address', 'p3-profiler' ); ?></label>
580
  <br />
581
  <input type="text" id="p3-advanced-ip" style="width:90%;" size="35" value="" title="<?php esc_attr_e( 'Enter IP address or regular expression pattern', 'p3-profiler' ); ?>" />
582
  <br />
583
- <em class="p3-em"><?php _e( 'Example: 1.2.3.4 or ( 1.2.3.4|4.5.6.7 )', 'p3-profiler' ); ?></em>
584
  </div>
585
  <br />
586
- <div>
587
  <input type="checkbox" id="p3-disable-opcode-cache" <?php if ( true == $opts['disable_opcode_cache'] ) : ?>checked="checked"<?php endif; ?> />
588
  <label for="p3-disable-opcode-cache"><?php _e( 'Attempt to disable opcode optimizers', 'p3-profiler' ); ?> <em>(<?php _e( 'recommended', 'p3-profiler' ); ?>)</em></label>
589
  <br />
590
  <em class="p3-em"><?php _e( 'This can increase accuracy in plugin detection, but decrease accuracy in timing', 'p3-profiler' ); ?></em>
591
  </div>
592
  <br />
593
- <div>
594
  <input type="checkbox" id="p3-cache-buster" <?php if ( true == $opts['cache_buster'] ) : ?>checked="checked"<?php endif; ?> />
595
  <label for="p3-cache-buster"><?php _e( 'Attempt to circumvent browser cache', 'p3-profiler' ); ?></label>
596
  <br />
597
- <em class="p3-em"><?php printf( __('This may help fix a "No visits recorded" error message. See the <a href="%s">help</a> page for details.', 'p3-profiler' ),
598
  add_query_arg( array( 'p3_action' => 'help', 'current_scan' => null ) ) . '#q-debug-log'
599
  ); ?> </em>
600
  </div>
601
  <br />
602
- <div>
603
  <input type="checkbox" id="p3-debug" <?php if ( true == $opts['debug'] ) : ?>checked="checked"<?php endif; ?> />
604
  <label for="p3-debug"><?php _e( 'Debug mode', 'p3-profiler' ); ?></label>
605
  <br />
606
- <em class="p3-em"><?php printf( __('This will log the last 100 visits. Check the <a href="%s">help</a> page to view log messages.', 'p3-profiler' ),
607
  add_query_arg( array( 'p3_action' => 'help', 'current_scan' => null ) ) . '#q-debug-log'
608
  ); ?></em>
609
  </div>
@@ -638,15 +638,15 @@ $opts = get_option( 'p3-profiler_options' );
638
 
639
  <!-- Dialog for choose manual or auto scan -->
640
  <div id="p3-scan-name-dialog" class="p3-dialog">
641
- <div style="padding-top: 10px;"><?php _e( 'Scan name:', 'p3-profiler' ); ?>
642
  <input type="text" name="p3_scan_name" id="p3-scan-name" title="<?php esc_attr_e( 'Enter scan name here', 'p3-profiler' ); ?>"
643
  value="scan_<?php echo date( 'Y-m-d' ); ?>_<?php echo substr( md5( uniqid() ), -8 );?>" size="35" maxlength="100" />
644
  </div>
645
- <div style="padding-top: 10px;"><em class="p3-em"><?php _e( 'Enter the name of a previous scan to continue scanning', 'p3-profiler' ); ?></em></div>
646
  <br />
647
  <div class="p3-big-button">
648
- <input type="checkbox" id="p3-auto-scan-submit" checked="checked" /><label for="p3-auto-scan-submit"><?php _e( 'Auto Scan' , 'p3-profiler' ); ?></label>
649
- <input type="checkbox" id="p3-manual-scan-submit" checked="checked" /><label for="p3-manual-scan-submit"><?php _e( 'Manual Scan', 'p3-profiler' ); ?></label>
650
  </div>
651
  </div>
652
 
@@ -659,19 +659,19 @@ $opts = get_option( 'p3-profiler_options' );
659
 
660
  <!-- Cancel button -->
661
  <div class="p3-big-button" id="p3-cancel-scan-buttonset">
662
- <input type="checkbox" id="p3-cancel-scan-submit" checked="checked" /><label for="p3-cancel-scan-submit"><?php _e( 'Stop Scan', 'p3-profiler' ); ?></label>
663
  </div>
664
 
665
  <!-- View / resume buttons -->
666
  <div class="p3-big-button" id="p3-resume-scan-buttonset" style="display: none;">
667
- <input type="checkbox" id="p3-resume-scan-submit" checked="checked" /><label for="p3-resume-scan-submit"><?php _e( 'Resume', 'p3-profiler' ); ?></label>
668
  <input type="checkbox" id="p3-view-incomplete-results-submit" checked="checked" data-scan-name="" />
669
- <label for="p3-view-incomplete-results-submit"><?php _e( 'View Results', 'p3-profiler' ); ?></label>
670
  </div>
671
 
672
  <!-- View results button -->
673
  <div class="p3-big-button" id="p3-view-results-buttonset" style="display: none;">
674
  <input type="checkbox" id="p3-view-results-submit" checked="checked" data-scan-name="" />
675
- <label for="p3-view-results-submit"><?php _e( 'View Results', 'p3-profiler' ); ?></label>
676
  </div>
677
  </div>
485
  <?php echo wp_nonce_field( 'p3_ajax_start_scan', 'p3_nonce' ); ?>
486
  <strong><?php _e( 'My IP:', 'p3-profiler' ); ?></strong><?php echo htmlentities( p3_profiler_get_ip() ); ?>
487
  <div class="p3-big-button"><input type="checkbox" checked="checked" id="p3-start-scan-submit" />
488
+ <label for="p3-start-scan-submit" class="scan-btn"><?php _e( 'Start Scan', 'p3-profiler' ); ?></label></div>
489
  <a href="javascript:;" id="p3-advanced-settings"><?php _e( 'Advanced Settings', 'p3-profiler' ); ?></a>
490
 
491
  <?php } ?>
494
 
495
  <!-- First callout cell -->
496
  <td class="p3-callout">
497
+ <div class="p3-callout-outer-wrapper qtip-tip total-plugins-tip" title="<?php esc_attr_e( 'Total number of active plugins, including must-use plugins, on your site.', 'p3-profiler' ); ?>">
498
  <div class="p3-callout-inner-wrapper">
499
+ <div class="p3-callout-caption total-plugins-caption"><?php _e( 'Total Plugins:', 'p3-profiler' ); ?></div>
500
+ <div class="p3-callout-data total-plugins-data">
501
  <?php
502
  // Get the total number of plugins
503
  $active_plugins = count( get_mu_plugins() );
509
  echo $active_plugins;
510
  ?>
511
  </div>
512
+ <div class="p3-callout-caption total-plugins-info">(<?php _e( 'currently active', 'p3-profiler' ); ?>)</div>
513
  </div>
514
  </div>
515
  </td>
516
 
517
  <!-- Second callout cell -->
518
  <td class="p3-callout">
519
+ <div class="p3-callout-outer-wrapper qtip-tip load-time-tip" title="<?php esc_attr_e( 'Total number of seconds dedicated to plugin code per visit on your site.', 'p3-profiler' ); ?>"
520
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
521
  <div class="p3-callout-inner-wrapper">
522
+ <div class="p3-callout-caption load-time-caption"><?php _e( 'Plugin Load Time', 'p3-profiler' ); ?></div>
523
+ <div class="p3-callout-data load-time-data">
524
  <?php if ( null === self::$profile ) { ?>
525
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
526
  <?php } else { ?>
527
  <?php printf( '%.3f', self::$profile->averages['plugins'] ); ?>
528
  <?php } ?>
529
  </div>
530
+ <div class="p3-callout-caption load-time-info">(<?php _e( 'sec. per visit', 'p3-profiler' ); ?>)</div>
531
  </div>
532
  </div>
533
  </td>
534
 
535
  <!-- Third callout cell -->
536
  <td class="p3-callout">
537
+ <div class="p3-callout-outer-wrapper qtip-tip impact-tip" title="<?php esc_attr_e( 'Percent of load time on your site dedicated to plugin code', 'p3-profiler' ); ?>"
538
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
539
  <div class="p3-callout-inner-wrapper">
540
+ <div class="p3-callout-caption impact-caption"><?php _e( 'Plugin Impact', 'p3-profiler' ); ?></div>
541
+ <div class="p3-callout-data impact-data">
542
  <?php if ( null === self::$profile ) { ?>
543
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
544
  <?php } else { ?>
545
  <?php printf( '%.1f%%', self::$profile->averages['plugin_impact'] ); ?>
546
  <?php } ?>
547
  </div>
548
+ <div class="p3-callout-caption impact-info">(<?php _e( 'of page load time', 'p3-profiler' ); ?>)</div>
549
  </div>
550
  </div>
551
  </td>
552
 
553
  <!-- Fourth callout cell -->
554
  <td class="p3-callout">
555
+ <div class="p3-callout-outer-wrapper qtip-tip mysql-tip" title="<?php esc_attr_e( 'Total number of database queries per visit', 'p3-profiler' ); ?>"
556
  <?php if ( !empty( self::$scan ) ) { ?>title="<?php esc_attr_e( 'From', 'p3-profiler' ); ?> <?php echo basename( self::$scan ); ?><?php } ?>">
557
  <div class="p3-callout-inner-wrapper">
558
+ <div class="p3-callout-caption mysql-caption"><?php _e( 'MySQL Queries', 'p3-profiler' ); ?></div>
559
+ <div class="p3-callout-data mysql-data">
560
  <?php if ( null === self::$profile ) { ?>
561
  <span class="p3-faded-grey"><?php _e( 'n/a', 'p3-profiler' ); ?></span>
562
  <?php } else { ?>
563
  <?php echo round( self::$profile->averages['queries'] ); ?>
564
  <?php } ?>
565
  </div>
566
+ <div class="p3-callout-caption mysql-info"><?php _e( 'per visit', 'p3-profiler' ); ?></div>
567
  </div>
568
  </div>
569
  </td>
573
 
574
  <!-- Dialog for IP settings -->
575
  <div id="p3-ip-dialog" class="p3-dialog">
576
+ <div class="ip-text">
577
  <?php _e( 'IP address or pattern:', 'p3-profiler' ); ?><br /><br />
578
  <input type="checkbox" id="p3-use-current-ip" <?php if ( true == $opts['use_current_ip'] ) : ?>checked="checked"<?php endif; ?> />
579
  <label for="p3-use-current-ip"><?php _e( 'Use my IP address', 'p3-profiler' ); ?></label>
580
  <br />
581
  <input type="text" id="p3-advanced-ip" style="width:90%;" size="35" value="" title="<?php esc_attr_e( 'Enter IP address or regular expression pattern', 'p3-profiler' ); ?>" />
582
  <br />
583
+ <em class="p3-em ip-example-text"><?php _e( 'Example: 1.2.3.4 or ( 1.2.3.4|4.5.6.7 )', 'p3-profiler' ); ?></em>
584
  </div>
585
  <br />
586
+ <div class="opcode-text">
587
  <input type="checkbox" id="p3-disable-opcode-cache" <?php if ( true == $opts['disable_opcode_cache'] ) : ?>checked="checked"<?php endif; ?> />
588
  <label for="p3-disable-opcode-cache"><?php _e( 'Attempt to disable opcode optimizers', 'p3-profiler' ); ?> <em>(<?php _e( 'recommended', 'p3-profiler' ); ?>)</em></label>
589
  <br />
590
  <em class="p3-em"><?php _e( 'This can increase accuracy in plugin detection, but decrease accuracy in timing', 'p3-profiler' ); ?></em>
591
  </div>
592
  <br />
593
+ <div class="cache-text">
594
  <input type="checkbox" id="p3-cache-buster" <?php if ( true == $opts['cache_buster'] ) : ?>checked="checked"<?php endif; ?> />
595
  <label for="p3-cache-buster"><?php _e( 'Attempt to circumvent browser cache', 'p3-profiler' ); ?></label>
596
  <br />
597
+ <em class="p3-em"><?php printf( __('This may help fix a "No visits recorded" error message. See the <a href="%s" class="cache-help">help</a> page for details.', 'p3-profiler' ),
598
  add_query_arg( array( 'p3_action' => 'help', 'current_scan' => null ) ) . '#q-debug-log'
599
  ); ?> </em>
600
  </div>
601
  <br />
602
+ <div class="debug-text">
603
  <input type="checkbox" id="p3-debug" <?php if ( true == $opts['debug'] ) : ?>checked="checked"<?php endif; ?> />
604
  <label for="p3-debug"><?php _e( 'Debug mode', 'p3-profiler' ); ?></label>
605
  <br />
606
+ <em class="p3-em"><?php printf( __('This will log the last 100 visits. Check the <a href="%s" class="debug-help">help</a> page to view log messages.', 'p3-profiler' ),
607
  add_query_arg( array( 'p3_action' => 'help', 'current_scan' => null ) ) . '#q-debug-log'
608
  ); ?></em>
609
  </div>
638
 
639
  <!-- Dialog for choose manual or auto scan -->
640
  <div id="p3-scan-name-dialog" class="p3-dialog">
641
+ <div style="padding-top: 10px;" class="scan-title"><?php _e( 'Scan name:', 'p3-profiler' ); ?>
642
  <input type="text" name="p3_scan_name" id="p3-scan-name" title="<?php esc_attr_e( 'Enter scan name here', 'p3-profiler' ); ?>"
643
  value="scan_<?php echo date( 'Y-m-d' ); ?>_<?php echo substr( md5( uniqid() ), -8 );?>" size="35" maxlength="100" />
644
  </div>
645
+ <div style="padding-top: 10px;"><em class="p3-em scan-description"><?php _e( 'Enter the name of a previous scan to continue scanning', 'p3-profiler' ); ?></em></div>
646
  <br />
647
  <div class="p3-big-button">
648
+ <input type="checkbox" id="p3-auto-scan-submit" checked="checked" /><label for="p3-auto-scan-submit" class="auto-scan"><?php _e( 'Auto Scan' , 'p3-profiler' ); ?></label>
649
+ <input type="checkbox" id="p3-manual-scan-submit" checked="checked" /><label for="p3-manual-scan-submit" class="manual-scan"><?php _e( 'Manual Scan', 'p3-profiler' ); ?></label>
650
  </div>
651
  </div>
652
 
659
 
660
  <!-- Cancel button -->
661
  <div class="p3-big-button" id="p3-cancel-scan-buttonset">
662
+ <input type="checkbox" id="p3-cancel-scan-submit" checked="checked" /><label for="p3-cancel-scan-submit" class="stop-scan"><?php _e( 'Stop Scan', 'p3-profiler' ); ?></label>
663
  </div>
664
 
665
  <!-- View / resume buttons -->
666
  <div class="p3-big-button" id="p3-resume-scan-buttonset" style="display: none;">
667
+ <input type="checkbox" id="p3-resume-scan-submit" checked="checked" /><label for="p3-resume-scan-submit" class="resume-scan"><?php _e( 'Resume', 'p3-profiler' ); ?></label>
668
  <input type="checkbox" id="p3-view-incomplete-results-submit" checked="checked" data-scan-name="" />
669
+ <label for="p3-view-incomplete-results-submit" class="incomplete-results"><?php _e( 'View Results', 'p3-profiler' ); ?></label>
670
  </div>
671
 
672
  <!-- View results button -->
673
  <div class="p3-big-button" id="p3-view-results-buttonset" style="display: none;">
674
  <input type="checkbox" id="p3-view-results-submit" checked="checked" data-scan-name="" />
675
+ <label for="p3-view-results-submit" class="view-results"><?php _e( 'View Results', 'p3-profiler' ); ?></label>
676
  </div>
677
  </div>
templates/help.php CHANGED
@@ -74,7 +74,7 @@ if ( !defined('P3_PATH') )
74
 
75
  <div class="p3-question">
76
  <a name="top">&nbsp;</a>
77
- <h2 class="p3-help-question"><?php _e( 'Contents', 'p3-profiler' ); ?></h2>
78
  <blockquote>
79
  <div id="p3-help-toc"></div>
80
  </blockquote>
@@ -82,8 +82,8 @@ if ( !defined('P3_PATH') )
82
 
83
 
84
  <div class="p3-question">
85
- <h2 class="p3-help-question"><?php _e( 'What does the P3 plugin do?', 'p3-profiler' ); ?></h2>
86
- <blockquote>
87
  <?php _e( "This plugin does just what its name says, it creates a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.
88
  <br /><br />
89
  Often times, WordPress sites load slowly because of poorly-configured plugins or because there are so many of them. This plugin can help you narrow down the cause of your site's slowness.", 'p3-profiler' ); ?>
@@ -91,15 +91,15 @@ Often times, WordPress sites load slowly because of poorly-configured plugins or
91
  </div>
92
 
93
  <div class="p3-question">
94
- <h2 class="p3-help-question"><?php _e( 'How do I use this?', 'p3-profiler' ); ?></h2>
95
- <blockquote>
96
  <?php _e( "Simply click \"Start Scan\" to run an automated scan of your site. The scanner generates some traffic on your site and monitors your site's performance on the server, then shows you the results. With this information, you can decide what action to take.", 'p3-profiler' ); ?>
97
  </blockquote>
98
  </div>
99
 
100
  <div class="p3-question">
101
- <h2 class="p3-help-question"><?php _e( 'What do I do with these results?', 'p3-profiler' ); ?></h2>
102
- <blockquote>
103
  <?php printf( __("If your site loads in an acceptable time (usually &lt; 0.5 seconds), you might consider other explanation for sluggish loading. For example, loading large images, large videos, or a lot of content can cause slowness. Tools like <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, or <a href=\"%7\$s\" target=\"_blank\">%8\$s</a> or <a href=\"%9\$s\" target=\"_blank\">%10\$s</a> can show you a connection breakdown of your site's content.", 'p3-profiler' ),
104
  'http://www.webpagetest.org/', __( 'webpagetest.org', 'p3-profiler' ),
105
  'http://getfirebug.com/', __( 'Firebug', 'p3-profiler' ),
@@ -111,8 +111,8 @@ Often times, WordPress sites load slowly because of poorly-configured plugins or
111
  </div>
112
 
113
  <div class="p3-question">
114
- <h2 class="p3-help-question" data-question-id="q-circumvent-cache"><?php _e( 'How do I fix "No visits recorded..." ?', 'p3-profiler' ); ?></h2>
115
- <blockquote>
116
  <?php _e( 'This error message means that after being disabled, the profiler did not record any traffic on your site. There are several common causes for this:', 'p3-profiler' ); ?>
117
  <ul>
118
  <li>
@@ -141,15 +141,15 @@ Often times, WordPress sites load slowly because of poorly-configured plugins or
141
  </div>
142
 
143
  <div class="p3-question">
144
- <h2 class="p3-help-question"><?php _e( 'Why did P3 only record 2 or 3 visits during the scan?', 'p3-profiler' ); ?></h2>
145
- <blockquote>
146
  <?php _e( "If your site is using a caching plugin, some pages might be cached in your browser or on the server and are loading before before WordPress can generate them. When this happens, the P3 plugin doesn't load and doesn't record any traffic. Please enable the \"Attempt to circumvent browser cache\" option in the advanced settings.", 'p3-profiler' ); ?>
147
  </blockquote>
148
  </div>
149
 
150
  <div class="p3-question">
151
- <h2 class="p3-help-question"><?php _e( "How does this work?", 'p3-profiler' ); ?></h2>
152
- <blockquote>
153
  <?php printf( __("When you activate the plugin by clicking \"Start Scan,\" it detects visits from your IP address, and actively monitors all <a href=\"%s\" target=\"_blank\">php user defined function calls</a> while the server generates your WordPress pages. It then records the information in a report file you can view later. When the scan is complete, or you click \"Stop Scan,\" the plugin becomes dormant again.", 'p3-profiler'),
154
  'http://php.net/functions'
155
  ); ?>
@@ -157,8 +157,8 @@ Often times, WordPress sites load slowly because of poorly-configured plugins or
157
  </div>
158
 
159
  <div class="p3-question">
160
- <h2 class="p3-help-question"><?php _e( "How does my site load the plugin?", 'p3-profiler' ); ?></h2>
161
- <blockquote>
162
  <?php printf( __("This plugin automatically creates a <a href=\"%s\" target=\"_blank\">must-use</a> plugin to load before other plugins. If that doesn't work, it runs like a regular plugin.", 'p3-profiler' ),
163
  'http://codex.wordpress.org/Must_Use_Plugins'
164
  ); ?>
@@ -181,8 +181,8 @@ Often times, WordPress sites load slowly because of poorly-configured plugins or
181
  </div>
182
 
183
  <div class="p3-question">
184
- <h2 class="p3-help-question"><?php _e( "How accurate are these results?", 'p3-profiler' ); ?></h2>
185
- <blockquote>
186
  <?php printf( __( "The results have an inherent margin of error because of the nature of the tool and its multi-layered design. The plugin changes the environment to measure it, and that makes it impossible to get completely accurate results.
187
  <br /><br />
188
  It gets really close, though! The \"margin of error\" on the Advanced Metrics page displays the discrepancy between the measured results (the time for your site's PHP code to completely run) and the expected results (sum of the plugins, core, theme, profile load times) to show you the plugin's accuracy.
@@ -194,8 +194,8 @@ If you want more accurate results, you'll need to resort to a different profiler
194
  </div>
195
 
196
  <div class="p3-question">
197
- <h2 class="p3-help-question"><?php _e( "Why are some plugins slow?", 'p3-profiler' ); ?></h2>
198
- <blockquote>
199
  <?php _e( "WordPress is a complex ecosystem of plugins and themes, and it lives on a complex ecosystem of software on your web server.
200
  <br /><br />
201
  If a plugin runs slowly just once, it's probably an anomaly, a transient hiccup, and you can safely ignore it.
@@ -209,8 +209,8 @@ If a plugin consistently shows slowness, you might want to contact the plugin au
209
  </div>
210
 
211
  <div class="p3-question">
212
- <h2 class="p3-help-question"><?php _e( "How are these results different from YSlow / PageSpeed / Webpagetest.org / Pingdom Tools?", 'p3-profiler' ); ?></h2>
213
- <blockquote>
214
  <?php printf( __("This plugin measures how your site was generated on the server. Tools like <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, and <a href=\"%7\$s\" target=\"_blank\">%8\$s</a> measure how your site looks to the browser.", 'p3-profiler'),
215
  'http://developer.yahoo.com/yslow/', __( 'YSlow', 'p3-profiler' ),
216
  'https://developers.google.com/pagespeed/', __( 'PageSpeed', 'p3-profiler' ),
@@ -221,8 +221,8 @@ If a plugin consistently shows slowness, you might want to contact the plugin au
221
  </div>
222
 
223
  <div class="p3-question">
224
- <h2 class="p3-help-question"><?php _e( "What can interfere with testing?", 'p3-profiler' ); ?></h2>
225
- <blockquote>
226
  <?php _e( "Opcode optimizers can interfere with PHP backtraces. Leaving opcode optimizers turned on will result in timing that more accurately reflects your site's real performance, but the function calls to plugins may be \"optimized\" out of the backtraces and some plugins (especially those with only one hook) might not show up. Disabling opcode caches results in slower times, but shows all plugins.
227
  <br /><br />
228
  By default, this plugin attempts to disable any detected opcode optimizers when it runs. You can change this setting by clicking \"Advanced Settings\" under \"Start Scan.\"
@@ -232,8 +232,8 @@ Caching plugins that have an option to disable caches for logged in users will n
232
  </div>
233
 
234
  <div class="p3-question">
235
- <h2 class="p3-help-question" data-question-id="q-opcode-optimizer"><?php _e( "Is my site using an opcode optimizer?", 'p3-profiler' ); ?></h2>
236
- <blockquote>
237
  <?php $detected = 0; if ( extension_loaded( 'xcache' ) ) { $detected++; ?>
238
  <?php _e( "Your site is using XCache. Although XCache reports that no opcode optimization won't be implemented until version 2.0, this has been known to cause problems with P3.", 'p3-profiler' ); ?>
239
  <br />
@@ -284,8 +284,8 @@ Caching plugins that have an option to disable caches for logged in users will n
284
 
285
 
286
  <div class="p3-question">
287
- <h2 class="p3-help-question"><?php _e( "How much room do these profiles take up on my server", 'p3-profiler' ); ?></h2>
288
- <blockquote>
289
  <?php
290
  $total_size = 0;
291
  $dir = opendir( P3_PROFILES_PATH );
@@ -305,8 +305,8 @@ Caching plugins that have an option to disable caches for logged in users will n
305
  </div>
306
 
307
  <div class="p3-question">
308
- <h2 class="p3-help-question"><?php _e( "Is this plugin always running?", 'p3-profiler' ); ?></h2>
309
- <blockquote>
310
  <?php _e( "The short answer is no.
311
  <br /><br />
312
  The more detailed answer is the loader is always running, but checks very early in the page loading process to see if you've enabled profiling mode and if the user's IP address matches the IP address the plugin is monitoring. For multisite installations, it also matches the site URL. If all these match, the plugin becomes active and profiles. Otherwise, your site loads as normal with no other code overhead.
@@ -316,8 +316,8 @@ Deactivating the plugin ensures it's not running at all, and does not delete you
316
  </div>
317
 
318
  <div class="p3-question">
319
- <h2 class="p3-help-question"><?php _e( "How can I test specific pages on my site?", 'p3-profiler' ); ?></h2>
320
- <blockquote>
321
  <?php _e( "When you start a scan, choose \"Manual Scan\" and then you can visit specific links on your site that you want to profile. If you want to profile the admin section, just click the \"X\" in the top right of the scan window and you'll be returned to your admin section. You can browse as normal, then come back to the profile page and click \"Stop Scan\" when you're ready to view the results.
322
  <br /><br />
323
  To scan your site as an anonymous user, select \"Manual Mode\" as above, but instead of clicking your site in the scan window, open a different browser (or an incognito window) and browse your site as a logged out user. When you're done, close that browser and return to your admin. Click \"I'm done\" and view your scan results.", 'p3-profiler' ); ?>
@@ -325,8 +325,8 @@ To scan your site as an anonymous user, select \"Manual Mode\" as above, but ins
325
  </div>
326
 
327
  <div class="p3-question">
328
- <h2 class="p3-help-question"><?php _e( "My plugins don't seem to cause site slowness. Why is my site still slow?", 'p3-profiler' ); ?></h2>
329
- <blockquote>
330
  <?php printf( __( "Your site can be slow for a number of reasons. Your site could have a lot of traffic, other sites on your server could have a lot of traffic, you could be referencing content from other sites that are slow, your Internet connection could be slow, your server could be out of RAM, your site could be very image heavy, your site could require a lot of HTTP requests, etc. In short, a lot of factors can cause slowness on your site
331
  <br /><br />
332
  Your next stop should be to use <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, <a href=\"%7\$s\" target=\"_blank\">%8\$s</a>, and your browser's development tools like <a href=\"%9\$s\" target=\"_blank\">%10\$s</a> for Firefox, <a href=\"%11\$s\" target=\"_blank\">%12\$s</a> for Chrome, or <a href=\"%13\$s\" target=\"_blank\">%14\$s</a> for Safari.
@@ -344,8 +344,8 @@ After you've tuned your site up as much as possible, if you're still not happy w
344
  </div>
345
 
346
  <div class="p3-question">
347
- <h2 class="p3-help-question" data-question-id="q-debug-log"><?php _e( "Where can I view the debug log?", 'p3-profiler' ); ?></h2>
348
- <blockquote>
349
  <?php printf( __( "Debug mode will record 100 visits to your site, then turn off automatically. You can view the log below. The entries are shown in reverse order with the latest visits appearing at the top of the list. You can also <a href=\"%1\$s\" class=\"button-secondary\">Clear the log</a> or <a href=\"%2\$s\" class=\"button-secondary\">Download the log</a> as a CSV.", 'p3-profiler' ),
350
  wp_nonce_url( add_query_arg( array( 'p3_action' => 'clear-debug-log' ) ), 'p3-clear-debug-log' ),
351
  wp_nonce_url( add_query_arg( array( 'p3_action' => 'download-debug-log' ) ), 'p3-download-debug-log' )
@@ -421,8 +421,8 @@ After you've tuned your site up as much as possible, if you're still not happy w
421
  </div>
422
 
423
  <div class="p3-question">
424
- <h2 class="p3-help-question"><?php _e( "What if I get a warning about usort()?", 'p3-profiler' ); ?></h2>
425
- <blockquote>
426
  <?php printf( _x( "Warning messages like this: <code>Warning: usort() [function.usort]: Array was modified by the user comparison function</code> are due to a known php bug. See <a href=\"%s\" target=\"_blank\">php bug #50688</a> for more information. This warning does not affect the functionality of your site and it is not visible to your users.", 'Warning message is taken verbatim from PHP output', 'p3-profiler' ),
427
  'https://bugs.php.net/bug.php?id=50688'
428
  ); ?>
@@ -430,8 +430,8 @@ After you've tuned your site up as much as possible, if you're still not happy w
430
  </div>
431
 
432
  <div class="p3-question">
433
- <h2 class="p3-help-question"><?php _e( "Does this plugin increase memory usage on my site?", 'p3-profiler' ); ?></h2>
434
- <blockquote>
435
  <?php printf( __( "When you run a performance scan on your site, the memory requirements go up during the scan. Accordingly, P3 sets your <a href=\"%1\$s\" target=\"_blank\">%2\$s</a> to 256 MB and <a href=\"%3\$s\" target=\"_blank\">%4\$s</a> to 90 seconds during a performance scan. These changes are not permanent and are only in effect when a performance scan is actively running.", 'p3-profiler' ),
436
  'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', __( 'memory limit', 'p3-profiler' ),
437
  'http://php.net/set_time_limit', __( 'time limit', 'p3-profiler' )
@@ -440,8 +440,8 @@ After you've tuned your site up as much as possible, if you're still not happy w
440
  </div>
441
 
442
  <div class="p3-question">
443
- <h2 class="p3-help-question" style="border-bottom-width: 0px !important;"><?php _e( 'Glossary', 'p3-profiler' ); ?></h2>
444
- <blockquote>
445
  <div>
446
  <div id="p3-glossary-container">
447
  <div class="ui-widget-header" id="p3-glossary-header" style="padding: 8px;">
@@ -563,8 +563,8 @@ Ideally, this number should be zero, but there's nothing you can do to change it
563
  </div>
564
 
565
  <div class="p3-question">
566
- <h2 class="p3-help-question"><?php _e( "License", 'p3-profiler' ); ?></h2>
567
- <blockquote>
568
  <?php printf( __( 'P3 (Plugin Performance Profiler) is Copyright &copy; %1$s - %2$s <a href="%3$s" target="_blank">GoDaddy.com</a>. All rights reserved.', 'p3-profiler' ), 2011, date( 'Y' ), 'http://www.godaddy.com/' ); ?>
569
  <br /><br />
570
  <?php printf( __( "This program is offered under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation.
74
 
75
  <div class="p3-question">
76
  <a name="top">&nbsp;</a>
77
+ <h2 class="p3-help-question q-content"><?php _e( 'Contents', 'p3-profiler' ); ?></h2>
78
  <blockquote>
79
  <div id="p3-help-toc"></div>
80
  </blockquote>
82
 
83
 
84
  <div class="p3-question">
85
+ <h2 class="p3-help-question q-plugin-do"><?php _e( 'What does the P3 plugin do?', 'p3-profiler' ); ?></h2>
86
+ <blockquote class="q-plugin-do-data">
87
  <?php _e( "This plugin does just what its name says, it creates a profile of your WordPress site's plugins' performance by measuring their impact on your site's load time.
88
  <br /><br />
89
  Often times, WordPress sites load slowly because of poorly-configured plugins or because there are so many of them. This plugin can help you narrow down the cause of your site's slowness.", 'p3-profiler' ); ?>
91
  </div>
92
 
93
  <div class="p3-question">
94
+ <h2 class="p3-help-question q-how-use"><?php _e( 'How do I use this?', 'p3-profiler' ); ?></h2>
95
+ <blockquote class="q-how-use-data">
96
  <?php _e( "Simply click \"Start Scan\" to run an automated scan of your site. The scanner generates some traffic on your site and monitors your site's performance on the server, then shows you the results. With this information, you can decide what action to take.", 'p3-profiler' ); ?>
97
  </blockquote>
98
  </div>
99
 
100
  <div class="p3-question">
101
+ <h2 class="p3-help-question q-results"><?php _e( 'What do I do with these results?', 'p3-profiler' ); ?></h2>
102
+ <blockquote class="q-results-data">
103
  <?php printf( __("If your site loads in an acceptable time (usually &lt; 0.5 seconds), you might consider other explanation for sluggish loading. For example, loading large images, large videos, or a lot of content can cause slowness. Tools like <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, or <a href=\"%7\$s\" target=\"_blank\">%8\$s</a> or <a href=\"%9\$s\" target=\"_blank\">%10\$s</a> can show you a connection breakdown of your site's content.", 'p3-profiler' ),
104
  'http://www.webpagetest.org/', __( 'webpagetest.org', 'p3-profiler' ),
105
  'http://getfirebug.com/', __( 'Firebug', 'p3-profiler' ),
111
  </div>
112
 
113
  <div class="p3-question">
114
+ <h2 class="p3-help-question q-no-visits" data-question-id="q-circumvent-cache"><?php _e( 'How do I fix "No visits recorded..." ?', 'p3-profiler' ); ?></h2>
115
+ <blockquote class="q-no-visits-data">
116
  <?php _e( 'This error message means that after being disabled, the profiler did not record any traffic on your site. There are several common causes for this:', 'p3-profiler' ); ?>
117
  <ul>
118
  <li>
141
  </div>
142
 
143
  <div class="p3-question">
144
+ <h2 class="p3-help-question q-few-visits"><?php _e( 'Why did P3 only record 2 or 3 visits during the scan?', 'p3-profiler' ); ?></h2>
145
+ <blockquote class="q-few-visits-data">
146
  <?php _e( "If your site is using a caching plugin, some pages might be cached in your browser or on the server and are loading before before WordPress can generate them. When this happens, the P3 plugin doesn't load and doesn't record any traffic. Please enable the \"Attempt to circumvent browser cache\" option in the advanced settings.", 'p3-profiler' ); ?>
147
  </blockquote>
148
  </div>
149
 
150
  <div class="p3-question">
151
+ <h2 class="p3-help-question q-p3-work"><?php _e( "How does this work?", 'p3-profiler' ); ?></h2>
152
+ <blockquote class="q-p3-work-data">
153
  <?php printf( __("When you activate the plugin by clicking \"Start Scan,\" it detects visits from your IP address, and actively monitors all <a href=\"%s\" target=\"_blank\">php user defined function calls</a> while the server generates your WordPress pages. It then records the information in a report file you can view later. When the scan is complete, or you click \"Stop Scan,\" the plugin becomes dormant again.", 'p3-profiler'),
154
  'http://php.net/functions'
155
  ); ?>
157
  </div>
158
 
159
  <div class="p3-question">
160
+ <h2 class="p3-help-question q-site-load"><?php _e( "How does my site load the plugin?", 'p3-profiler' ); ?></h2>
161
+ <blockquote class="q-site-load-data">
162
  <?php printf( __("This plugin automatically creates a <a href=\"%s\" target=\"_blank\">must-use</a> plugin to load before other plugins. If that doesn't work, it runs like a regular plugin.", 'p3-profiler' ),
163
  'http://codex.wordpress.org/Must_Use_Plugins'
164
  ); ?>
181
  </div>
182
 
183
  <div class="p3-question">
184
+ <h2 class="p3-help-question q-accurate"><?php _e( "How accurate are these results?", 'p3-profiler' ); ?></h2>
185
+ <blockquote class="q-accurate-data">
186
  <?php printf( __( "The results have an inherent margin of error because of the nature of the tool and its multi-layered design. The plugin changes the environment to measure it, and that makes it impossible to get completely accurate results.
187
  <br /><br />
188
  It gets really close, though! The \"margin of error\" on the Advanced Metrics page displays the discrepancy between the measured results (the time for your site's PHP code to completely run) and the expected results (sum of the plugins, core, theme, profile load times) to show you the plugin's accuracy.
194
  </div>
195
 
196
  <div class="p3-question">
197
+ <h2 class="p3-help-question q-plugins-slow"><?php _e( "Why are some plugins slow?", 'p3-profiler' ); ?></h2>
198
+ <blockquote class="q-plugins-slow-data">
199
  <?php _e( "WordPress is a complex ecosystem of plugins and themes, and it lives on a complex ecosystem of software on your web server.
200
  <br /><br />
201
  If a plugin runs slowly just once, it's probably an anomaly, a transient hiccup, and you can safely ignore it.
209
  </div>
210
 
211
  <div class="p3-question">
212
+ <h2 class="p3-help-question q-different"><?php _e( "How are these results different from YSlow / PageSpeed / Webpagetest.org / Pingdom Tools?", 'p3-profiler' ); ?></h2>
213
+ <blockquote class="q-different-data">
214
  <?php printf( __("This plugin measures how your site was generated on the server. Tools like <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, and <a href=\"%7\$s\" target=\"_blank\">%8\$s</a> measure how your site looks to the browser.", 'p3-profiler'),
215
  'http://developer.yahoo.com/yslow/', __( 'YSlow', 'p3-profiler' ),
216
  'https://developers.google.com/pagespeed/', __( 'PageSpeed', 'p3-profiler' ),
221
  </div>
222
 
223
  <div class="p3-question">
224
+ <h2 class="p3-help-question q-interfere"><?php _e( "What can interfere with testing?", 'p3-profiler' ); ?></h2>
225
+ <blockquote class="q-interfere-data">
226
  <?php _e( "Opcode optimizers can interfere with PHP backtraces. Leaving opcode optimizers turned on will result in timing that more accurately reflects your site's real performance, but the function calls to plugins may be \"optimized\" out of the backtraces and some plugins (especially those with only one hook) might not show up. Disabling opcode caches results in slower times, but shows all plugins.
227
  <br /><br />
228
  By default, this plugin attempts to disable any detected opcode optimizers when it runs. You can change this setting by clicking \"Advanced Settings\" under \"Start Scan.\"
232
  </div>
233
 
234
  <div class="p3-question">
235
+ <h2 class="p3-help-question q-opcode" data-question-id="q-opcode-optimizer"><?php _e( "Is my site using an opcode optimizer?", 'p3-profiler' ); ?></h2>
236
+ <blockquote class="q-opcode-data">
237
  <?php $detected = 0; if ( extension_loaded( 'xcache' ) ) { $detected++; ?>
238
  <?php _e( "Your site is using XCache. Although XCache reports that no opcode optimization won't be implemented until version 2.0, this has been known to cause problems with P3.", 'p3-profiler' ); ?>
239
  <br />
284
 
285
 
286
  <div class="p3-question">
287
+ <h2 class="p3-help-question q-space"><?php _e( "How much room do these profiles take up on my server?", 'p3-profiler' ); ?></h2>
288
+ <blockquote class="q-space-data">
289
  <?php
290
  $total_size = 0;
291
  $dir = opendir( P3_PROFILES_PATH );
305
  </div>
306
 
307
  <div class="p3-question">
308
+ <h2 class="p3-help-question q-running"><?php _e( "Is this plugin always running?", 'p3-profiler' ); ?></h2>
309
+ <blockquote class="q-running-data">
310
  <?php _e( "The short answer is no.
311
  <br /><br />
312
  The more detailed answer is the loader is always running, but checks very early in the page loading process to see if you've enabled profiling mode and if the user's IP address matches the IP address the plugin is monitoring. For multisite installations, it also matches the site URL. If all these match, the plugin becomes active and profiles. Otherwise, your site loads as normal with no other code overhead.
316
  </div>
317
 
318
  <div class="p3-question">
319
+ <h2 class="p3-help-question q-specific"><?php _e( "How can I test specific pages on my site?", 'p3-profiler' ); ?></h2>
320
+ <blockquote class="q-specfic-data">
321
  <?php _e( "When you start a scan, choose \"Manual Scan\" and then you can visit specific links on your site that you want to profile. If you want to profile the admin section, just click the \"X\" in the top right of the scan window and you'll be returned to your admin section. You can browse as normal, then come back to the profile page and click \"Stop Scan\" when you're ready to view the results.
322
  <br /><br />
323
  To scan your site as an anonymous user, select \"Manual Mode\" as above, but instead of clicking your site in the scan window, open a different browser (or an incognito window) and browse your site as a logged out user. When you're done, close that browser and return to your admin. Click \"I'm done\" and view your scan results.", 'p3-profiler' ); ?>
325
  </div>
326
 
327
  <div class="p3-question">
328
+ <h2 class="p3-help-question q-still-slow"><?php _e( "My plugins don't seem to cause site slowness. Why is my site still slow?", 'p3-profiler' ); ?></h2>
329
+ <blockquote class="q-still-slow-data">
330
  <?php printf( __( "Your site can be slow for a number of reasons. Your site could have a lot of traffic, other sites on your server could have a lot of traffic, you could be referencing content from other sites that are slow, your Internet connection could be slow, your server could be out of RAM, your site could be very image heavy, your site could require a lot of HTTP requests, etc. In short, a lot of factors can cause slowness on your site
331
  <br /><br />
332
  Your next stop should be to use <a href=\"%1\$s\" target=\"_blank\">%2\$s</a>, <a href=\"%3\$s\" target=\"_blank\">%4\$s</a>, <a href=\"%5\$s\" target=\"_blank\">%6\$s</a>, <a href=\"%7\$s\" target=\"_blank\">%8\$s</a>, and your browser's development tools like <a href=\"%9\$s\" target=\"_blank\">%10\$s</a> for Firefox, <a href=\"%11\$s\" target=\"_blank\">%12\$s</a> for Chrome, or <a href=\"%13\$s\" target=\"_blank\">%14\$s</a> for Safari.
344
  </div>
345
 
346
  <div class="p3-question">
347
+ <h2 class="p3-help-question q-debug" data-question-id="q-debug-log"><?php _e( "Where can I view the debug log?", 'p3-profiler' ); ?></h2>
348
+ <blockquote class="q-debug-data">
349
  <?php printf( __( "Debug mode will record 100 visits to your site, then turn off automatically. You can view the log below. The entries are shown in reverse order with the latest visits appearing at the top of the list. You can also <a href=\"%1\$s\" class=\"button-secondary\">Clear the log</a> or <a href=\"%2\$s\" class=\"button-secondary\">Download the log</a> as a CSV.", 'p3-profiler' ),
350
  wp_nonce_url( add_query_arg( array( 'p3_action' => 'clear-debug-log' ) ), 'p3-clear-debug-log' ),
351
  wp_nonce_url( add_query_arg( array( 'p3_action' => 'download-debug-log' ) ), 'p3-download-debug-log' )
421
  </div>
422
 
423
  <div class="p3-question">
424
+ <h2 class="p3-help-question q-usort"><?php _e( "What if I get a warning about usort()?", 'p3-profiler' ); ?></h2>
425
+ <blockquote class="q-usort-data">
426
  <?php printf( _x( "Warning messages like this: <code>Warning: usort() [function.usort]: Array was modified by the user comparison function</code> are due to a known php bug. See <a href=\"%s\" target=\"_blank\">php bug #50688</a> for more information. This warning does not affect the functionality of your site and it is not visible to your users.", 'Warning message is taken verbatim from PHP output', 'p3-profiler' ),
427
  'https://bugs.php.net/bug.php?id=50688'
428
  ); ?>
430
  </div>
431
 
432
  <div class="p3-question">
433
+ <h2 class="p3-help-question q-memory"><?php _e( "Does this plugin increase memory usage on my site?", 'p3-profiler' ); ?></h2>
434
+ <blockquote class="q-memory-data">
435
  <?php printf( __( "When you run a performance scan on your site, the memory requirements go up during the scan. Accordingly, P3 sets your <a href=\"%1\$s\" target=\"_blank\">%2\$s</a> to 256 MB and <a href=\"%3\$s\" target=\"_blank\">%4\$s</a> to 90 seconds during a performance scan. These changes are not permanent and are only in effect when a performance scan is actively running.", 'p3-profiler' ),
436
  'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', __( 'memory limit', 'p3-profiler' ),
437
  'http://php.net/set_time_limit', __( 'time limit', 'p3-profiler' )
440
  </div>
441
 
442
  <div class="p3-question">
443
+ <h2 class="p3-help-question q-glossary" style="border-bottom-width: 0px !important;"><?php _e( 'Glossary', 'p3-profiler' ); ?></h2>
444
+ <blockquote class="q-glossary-data">
445
  <div>
446
  <div id="p3-glossary-container">
447
  <div class="ui-widget-header" id="p3-glossary-header" style="padding: 8px;">
563
  </div>
564
 
565
  <div class="p3-question">
566
+ <h2 class="p3-help-question q-license"><?php _e( "License", 'p3-profiler' ); ?></h2>
567
+ <blockquote class="q-license-data">
568
  <?php printf( __( 'P3 (Plugin Performance Profiler) is Copyright &copy; %1$s - %2$s <a href="%3$s" target="_blank">GoDaddy.com</a>. All rights reserved.', 'p3-profiler' ), 2011, date( 'Y' ), 'http://www.godaddy.com/' ); ?>
569
  <br /><br />
570
  <?php printf( __( "This program is offered under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation.
templates/template.php CHANGED
@@ -59,16 +59,16 @@ if ( 'current-scan' == self::$action || !empty( $_REQUEST['current_scan'] ) ) {
59
 
60
  <!-- Header icon / title -->
61
  <div id="icon-plugins" class="icon32"><br/></div>
62
- <h2><?php _e( 'P3 - Plugin Performance Profiler', 'p3-profiler' ); ?></h2>
63
 
64
  <!-- Header navbar -->
65
  <div class="ui-widget-header" id="p3-navbar">
66
  <div>
67
  <input type="radio" name="p3-nav" id="button-current-scan" <?php echo $button_current_checked; ?> />
68
- <label for="button-current-scan"><?php _e( 'Current', 'p3-profiler' ); ?></label>
69
  <input type="radio" name="p3-nav" id="button-history-scans" <?php echo $button_history_checked; ?> />
70
- <label for="button-history-scans"><?php _e( 'History', 'p3-profiler' ); ?></label>
71
- <input type="radio" name="p3-nav" id="button-help" <?php echo $button_help_checked; ?> /><label for="button-help"><?php _e( 'Help', 'p3-profiler' ); ?></label>
72
  </div>
73
 
74
  <div id="p3-scan-label">
59
 
60
  <!-- Header icon / title -->
61
  <div id="icon-plugins" class="icon32"><br/></div>
62
+ <h2 class="plugin-name"><?php _e( 'P3 - Plugin Performance Profiler', 'p3-profiler' ); ?></h2>
63
 
64
  <!-- Header navbar -->
65
  <div class="ui-widget-header" id="p3-navbar">
66
  <div>
67
  <input type="radio" name="p3-nav" id="button-current-scan" <?php echo $button_current_checked; ?> />
68
+ <label for="button-current-scan" class="current-tab"><?php _e( 'Current', 'p3-profiler' ); ?></label>
69
  <input type="radio" name="p3-nav" id="button-history-scans" <?php echo $button_history_checked; ?> />
70
+ <label for="button-history-scans" class="history-tab"><?php _e( 'History', 'p3-profiler' ); ?></label>
71
+ <input type="radio" name="p3-nav" id="button-help" <?php echo $button_help_checked; ?> /><label for="button-help" class="help-tab"><?php _e( 'Help', 'p3-profiler' ); ?></label>
72
  </div>
73
 
74
  <div id="p3-scan-label">
templates/view-scan.php CHANGED
@@ -73,7 +73,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
73
  [
74
  {
75
  text: '<?php _e( 'Send', 'p3-profiler' ); ?>',
76
- 'class' : 'button-secondary',
77
  click: function() {
78
  data = {
79
  'p3_to' : jQuery( '#p3-email-results-to' ).val(),
@@ -705,7 +705,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
705
 
706
  <!-- Plugin bar chart -->
707
  <div id="p3-tabs-5">
708
- <h2><?php _e( 'Detailed Breakdown', 'p3-profiler' ); ?></h2>
709
  <div class="p3-plugin-graph">
710
  <table>
711
  <tr>
@@ -715,10 +715,10 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
715
  </div>
716
  </td>
717
  <td rowspan="2">
718
- <div class="p3-graph-holder" id="p3-holder_<?php echo $component_breakdown_chart_id; ?>"></div>
719
  </td>
720
  <td>
721
- <h3><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
722
  </td>
723
  </tr>
724
  <tr>
@@ -740,15 +740,15 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
740
 
741
  <!-- Plugin pie chart div -->
742
  <div id="p3-tabs-1">
743
- <h2><?php _e( 'Runtime by Plugin', 'p3-profiler' ); ?></h2>
744
  <div class="p3-plugin-graph" style="width: 570px;">
745
  <table>
746
  <tr>
747
  <td rowspan="2">
748
- <div style="width: 370px;" class="p3-graph-holder" id="p3-holder_<?php echo $pie_chart_id; ?>"></div>
749
  </td>
750
  <td>
751
- <h3><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
752
  </td>
753
  </tr>
754
  <tr>
@@ -762,7 +762,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
762
 
763
  <!-- Runtime line chart div -->
764
  <div id="p3-tabs-2">
765
- <h2><?php _e( 'Summary Timeline', 'p3-profiler' ); ?></h2>
766
  <div class="p3-plugin-graph">
767
  <table>
768
  <tr>
@@ -772,10 +772,10 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
772
  </div>
773
  </td>
774
  <td rowspan="2">
775
- <div class="p3-graph-holder" id="p3-holder_<?php echo $runtime_chart_id; ?>"></div>
776
  </td>
777
  <td>
778
- <h3><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
779
  </td>
780
  </tr>
781
  <tr>
@@ -797,7 +797,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
797
 
798
  <!-- Query line chart div -->
799
  <div id="p3-tabs-3">
800
- <h2><?php _e( 'Query Timeline', 'p3-profiler' ); ?></h2>
801
  <div class="p3-plugin-graph">
802
  <table>
803
  <tr>
@@ -807,10 +807,10 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
807
  </div>
808
  </td>
809
  <td rowspan="2">
810
- <div class="p3-graph-holder" id="p3-holder_<?php echo $query_chart_id; ?>"></div>
811
  </td>
812
  <td>
813
- <h3><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
814
  </td>
815
  </tr>
816
  <tr>
@@ -832,7 +832,7 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
832
 
833
  <!-- Component runtime chart div -->
834
  <div id="p3-tabs-6">
835
- <h2><?php _e( 'Detailed Timeline', 'p3-profiler' ); ?></h2>
836
  <div class="p3-plugin-graph">
837
  <table>
838
  <tr>
@@ -842,10 +842,10 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
842
  </div>
843
  </td>
844
  <td rowspan="2">
845
- <div class="p3-graph-holder" id="p3-holder_<?php echo $component_runtime_chart_id; ?>"></div>
846
  </td>
847
  <td>
848
- <h3><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
849
  </td>
850
  </tr>
851
  <tr>
@@ -875,95 +875,95 @@ $component_runtime_chart_id = substr( md5( uniqid() ), -8 );
875
  <table class="p3-results-table" id="p3-results-table" cellpadding="0" cellspacing="0" border="0">
876
  <tbody>
877
  <tr class="advanced">
878
- <td class="qtip-tip" title="<?php esc_attr_e( "The time the site took to load. This is an observed measurement (start timing when the page was requested, stop timing when the page was delivered to the browser, calculate the difference). Lower is better.", 'p3-profiler' ); ?>">
879
  <strong><?php _e( 'Total Load Time:', 'p3-profiler' ); ?></strong>
880
  </td>
881
- <td>
882
  <?php printf( '%.4f', self::$profile->averages['total'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
883
  </td>
884
  </tr>
885
  <tr>
886
- <td class="qtip-tip" title="<?php esc_attr_e( "The calculated total load time minus the profile overhead. This is closer to your site's real-life load time. Lower is better.", 'p3-profiler' ); ?>">
887
- <strong><?php _e( 'Site Load Time', 'p3-profiler' ); ?></small></em></strong>
888
  </td>
889
- <td>
890
  <?php printf( '%.4f', self::$profile->averages['site'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
891
  </td>
892
  </tr>
893
  <tr class="advanced">
894
- <td class="qtip-tip" title="<?php esc_attr_e( "The load time spent profiling code. Because the profiler slows down your load time, it is important to know how much impact the profiler has. However, it doesn't impact your site's real-life load time.", 'p3-profiler' ); ?>">
895
  <strong><?php _e( 'Profile Overhead:', 'p3-profiler' ); ?></strong>
896
  </td>
897
- <td>
898
  <?php printf( '%.4f', self::$profile->averages['profile'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
899
  </td>
900
  </tr>
901
  <tr>
902
- <td class="qtip-tip" title="<?php esc_attr_e( "The load time caused by plugins. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. Lower is better.", 'p3-profiler' ); ?>">
903
  <strong><?php _e( 'Plugin Load Time:', 'p3-profiler' ); ?></strong>
904
  </td>
905
- <td>
906
  <?php printf( '%.4f', self::$profile->averages['plugins'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
907
  </td>
908
  </tr>
909
  <tr>
910
- <td class="qtip-tip" title="<?php esc_attr_e( "The load time spent applying the theme. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. Lower is better.", 'p3-profiler' ); ?>">
911
  <strong><?php _e( 'Theme Load Time:', 'p3-profiler' ); ?></strong>
912
  </td>
913
- <td>
914
  <?php printf( '%.4f', self::$profile->averages['theme'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
915
  </td>
916
  </tr>
917
  <tr>
918
- <td class="qtip-tip" title="<?php esc_attr_e( "The load time caused by the WordPress core. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. This will probably be constant.", 'p3-profiler' ); ?>">
919
  <strong><?php _e( 'Core Load Time:', 'p3-profiler' ); ?></strong>
920
  </td>
921
- <td>
922
  <?php printf( '%.4f', self::$profile->averages['core'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
923
  </td>
924
  </tr>
925
  <tr class="advanced">
926
- <td class="qtip-tip" title="<?php esc_attr_e( "This is the difference between the observed runtime (what actually happened) and expected runtime (adding the plugin runtime, theme runtime, core runtime, and profiler overhead). There are several reasons this margin of error can exist. Most likely, the profiler is missing microseconds while adding the runtime it observed. Using a network clock to set the time (NTP) can also cause minute timing changes. Ideally, this number should be zero, but there's nothing you can do to change it. It will give you an idea of how accurate the other results are.", 'p3-profiler' ); ?>">
927
  <strong><?php _e( 'Margin of Error:', 'p3-profiler' ); ?></strong>
928
  </td>
929
- <td>
930
  <?php printf( '%.4f', self::$profile->averages['drift'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
931
  <br />
932
  <em class="p3-em">
933
- (<span class="qtip-tip" title="<?php esc_attr_e( "How long the site took to load. This is an observed measurement (start timing when the page was requested, stop timing when the page was delivered to the browser, calculate the difference).", 'p3-profiler' ); ?>"><?php printf( '%.4f', self::$profile->averages['observed'] ); ?> <?php _e( 'observed', 'p3-profiler' ); ?></span>,
934
- <span class="qtip-tip" title="<?php esc_attr_e( "The expected site load time calculated by adding plugin load time, core load time, theme load time, and profiler overhead.", 'p3-profiler' ); ?>"><?php printf( '%.4f', self::$profile->averages['expected'] ); ?> <?php _e( 'expected', 'p3-profiler' ); ?></span>)
935
  </em>
936
  </td>
937
  </tr>
938
  <tr class="advanced">
939
- <td class="qtip-tip" title="<?php esc_attr_e( "The number of visits registered during a profiling session. More visits produce a more accurate summary.", 'p3-profiler' ); ?>">
940
  <strong><?php _e( 'Visits:', 'p3-profiler' ); ?></strong>
941
  </td>
942
- <td>
943
  <?php echo number_format( self::$profile->visits ); ?>
944
  </td>
945
  </tr>
946
  <tr class="advanced">
947
- <td class="qtip-tip" title="<?php esc_attr_e( "The number of PHP ticks recorded during the profiling session. A tick is loosely correlated to a PHP statement or function call. Fewer is better.", 'p3-profiler' ); ?>">
948
  <strong><?php _e ( 'Number of PHP ticks:', 'p3-profiler' ); ?></strong>
949
  </td>
950
- <td>
951
  <?php echo number_format( self::$profile->averages['plugin_calls'] ); ?> <?php _e( 'calls', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
952
  </td>
953
  </tr>
954
  <tr>
955
- <td class="qtip-tip" title="<?php esc_attr_e( "The amount of RAM usage observed. This is reported by memory_get_peak_usage(). Lower is better.", 'p3-profiler' ); ?>">
956
  <strong><?php _e( 'Memory Usage:', 'p3-profiler' ); ?></strong>
957
  </td>
958
- <td>
959
  <?php echo number_format( self::$profile->averages['memory'] / 1024 / 1024, 2 ); ?> <?php _ex( 'MB', 'Abbreviation for megabytes', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
960
  </td>
961
  </tr>
962
  <tr>
963
- <td class="qtip-tip" title="<?php esc_attr_e( "The count of queries sent to the database. This is reported by the WordPress function get_num_queries(). Lower is better.", 'p3-profiler' ); ?>">
964
  <strong><?php _e( 'MySQL Queries:', 'p3-profiler' ); ?></strong>
965
  </td>
966
- <td>
967
  <?php echo round( self::$profile->averages['queries'] ); ?> <?php _e( 'queries', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
968
  </td>
969
  </tr>
@@ -1062,7 +1062,7 @@ $plugin_list
1062
  <!-- Email sending dialog -->
1063
  <div id="p3-email-sending-dialog" class="p3-dialog">
1064
  <div id="p3-email-sending-loading">
1065
- <img src="<?php echo get_site_url() . '/wp-admin/images/loading.gif' ?>" height="16" width="16" title="<? esc_attr_e( 'Loading', 'p3-profiler' ); ?>" alt="<?php esc_attr_e( 'Loading', 'p3-profiler' ); ?>" />
1066
  </div>
1067
  <div id="p3-email-sending-error">
1068
  <?php _e( 'There was a problem sending the e-mail:', 'p3-profiler' ); ?> <span id="p3-email-error"></span>
@@ -1071,7 +1071,7 @@ $plugin_list
1071
  <?php _e( 'Your report was sent successfully to', 'p3-profiler' ); ?> <span id="p3-email-success-recipient"></span>
1072
  </div>
1073
  <div id="p3-email-sending-close">
1074
- <input type="checkbox" id="p3-email-sending-close-submit" checked="checked" /><label for="p3-email-sending-close-submit"><?php _e( 'Done', 'p3-profiler' ); ?></label>
1075
  </div>
1076
  </div>
1077
 
73
  [
74
  {
75
  text: '<?php _e( 'Send', 'p3-profiler' ); ?>',
76
+ 'class' : 'button-secondary email-send',
77
  click: function() {
78
  data = {
79
  'p3_to' : jQuery( '#p3-email-results-to' ).val(),
705
 
706
  <!-- Plugin bar chart -->
707
  <div id="p3-tabs-5">
708
+ <h2 class="detailed-title"><?php _e( 'Detailed Breakdown', 'p3-profiler' ); ?></h2>
709
  <div class="p3-plugin-graph">
710
  <table>
711
  <tr>
715
  </div>
716
  </td>
717
  <td rowspan="2">
718
+ <div class="p3-graph-holder detailed-graph" id="p3-holder_<?php echo $component_breakdown_chart_id; ?>"></div>
719
  </td>
720
  <td>
721
+ <h3 class="breakdown-legend"><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
722
  </td>
723
  </tr>
724
  <tr>
740
 
741
  <!-- Plugin pie chart div -->
742
  <div id="p3-tabs-1">
743
+ <h2 class="runtime-title"><?php _e( 'Runtime by Plugin', 'p3-profiler' ); ?></h2>
744
  <div class="p3-plugin-graph" style="width: 570px;">
745
  <table>
746
  <tr>
747
  <td rowspan="2">
748
+ <div style="width: 370px;" class="p3-graph-holder runtime-graph" id="p3-holder_<?php echo $pie_chart_id; ?>"></div>
749
  </td>
750
  <td>
751
+ <h3 class="runtime-legend"><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
752
  </td>
753
  </tr>
754
  <tr>
762
 
763
  <!-- Runtime line chart div -->
764
  <div id="p3-tabs-2">
765
+ <h2 class="summary-title"><?php _e( 'Summary Timeline', 'p3-profiler' ); ?></h2>
766
  <div class="p3-plugin-graph">
767
  <table>
768
  <tr>
772
  </div>
773
  </td>
774
  <td rowspan="2">
775
+ <div class="p3-graph-holder summary-graph" id="p3-holder_<?php echo $runtime_chart_id; ?>"></div>
776
  </td>
777
  <td>
778
+ <h3 class="summary-legend"><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
779
  </td>
780
  </tr>
781
  <tr>
797
 
798
  <!-- Query line chart div -->
799
  <div id="p3-tabs-3">
800
+ <h2 class="query-title"><?php _e( 'Query Timeline', 'p3-profiler' ); ?></h2>
801
  <div class="p3-plugin-graph">
802
  <table>
803
  <tr>
807
  </div>
808
  </td>
809
  <td rowspan="2">
810
+ <div class="p3-graph-holder query-graph" id="p3-holder_<?php echo $query_chart_id; ?>"></div>
811
  </td>
812
  <td>
813
+ <h3 class="query-legend"><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
814
  </td>
815
  </tr>
816
  <tr>
832
 
833
  <!-- Component runtime chart div -->
834
  <div id="p3-tabs-6">
835
+ <h2 class="detailed-timeline-title"><?php _e( 'Detailed Timeline', 'p3-profiler' ); ?></h2>
836
  <div class="p3-plugin-graph">
837
  <table>
838
  <tr>
842
  </div>
843
  </td>
844
  <td rowspan="2">
845
+ <div class="p3-graph-holder detailed-timeline-graph" id="p3-holder_<?php echo $component_runtime_chart_id; ?>"></div>
846
  </td>
847
  <td>
848
+ <h3 class="detailed-timeline-legend"><?php _ex( 'Legend', 'How to interpret the chart or graph', 'p3-profiler' ); ?></h3>
849
  </td>
850
  </tr>
851
  <tr>
875
  <table class="p3-results-table" id="p3-results-table" cellpadding="0" cellspacing="0" border="0">
876
  <tbody>
877
  <tr class="advanced">
878
+ <td class="qtip-tip tlt-label" title="<?php esc_attr_e( "The time the site took to load. This is an observed measurement (start timing when the page was requested, stop timing when the page was delivered to the browser, calculate the difference). Lower is better.", 'p3-profiler' ); ?>">
879
  <strong><?php _e( 'Total Load Time:', 'p3-profiler' ); ?></strong>
880
  </td>
881
+ <td class="tlt-data">
882
  <?php printf( '%.4f', self::$profile->averages['total'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
883
  </td>
884
  </tr>
885
  <tr>
886
+ <td class="qtip-tip slt-label" title="<?php esc_attr_e( "The calculated total load time minus the profile overhead. This is closer to your site's real-life load time. Lower is better.", 'p3-profiler' ); ?>">
887
+ <strong><?php _e( 'Site Load Time:', 'p3-profiler' ); ?></small></em></strong>
888
  </td>
889
+ <td class="slt-data">
890
  <?php printf( '%.4f', self::$profile->averages['site'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
891
  </td>
892
  </tr>
893
  <tr class="advanced">
894
+ <td class="qtip-tip poh-label" title="<?php esc_attr_e( "The load time spent profiling code. Because the profiler slows down your load time, it is important to know how much impact the profiler has. However, it doesn't impact your site's real-life load time.", 'p3-profiler' ); ?>">
895
  <strong><?php _e( 'Profile Overhead:', 'p3-profiler' ); ?></strong>
896
  </td>
897
+ <td class="poh-data">
898
  <?php printf( '%.4f', self::$profile->averages['profile'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
899
  </td>
900
  </tr>
901
  <tr>
902
+ <td class="qtip-tip plt-label" title="<?php esc_attr_e( "The load time caused by plugins. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. Lower is better.", 'p3-profiler' ); ?>">
903
  <strong><?php _e( 'Plugin Load Time:', 'p3-profiler' ); ?></strong>
904
  </td>
905
+ <td class="plt-data">
906
  <?php printf( '%.4f', self::$profile->averages['plugins'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
907
  </td>
908
  </tr>
909
  <tr>
910
+ <td class="qtip-tip theme-label" title="<?php esc_attr_e( "The load time spent applying the theme. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. Lower is better.", 'p3-profiler' ); ?>">
911
  <strong><?php _e( 'Theme Load Time:', 'p3-profiler' ); ?></strong>
912
  </td>
913
+ <td class="theme-data">
914
  <?php printf( '%.4f', self::$profile->averages['theme'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
915
  </td>
916
  </tr>
917
  <tr>
918
+ <td class="qtip-tip clt-label" title="<?php esc_attr_e( "The load time caused by the WordPress core. Because of WordPress' construction, we can trace a function call from a plugin through a theme through the core. The profiler prioritizes plugin calls first, theme calls second, and core calls last. This will probably be constant.", 'p3-profiler' ); ?>">
919
  <strong><?php _e( 'Core Load Time:', 'p3-profiler' ); ?></strong>
920
  </td>
921
+ <td class="clt-data">
922
  <?php printf( '%.4f', self::$profile->averages['core'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
923
  </td>
924
  </tr>
925
  <tr class="advanced">
926
+ <td class="qtip-tip moe-label" title="<?php esc_attr_e( "This is the difference between the observed runtime (what actually happened) and expected runtime (adding the plugin runtime, theme runtime, core runtime, and profiler overhead). There are several reasons this margin of error can exist. Most likely, the profiler is missing microseconds while adding the runtime it observed. Using a network clock to set the time (NTP) can also cause minute timing changes. Ideally, this number should be zero, but there's nothing you can do to change it. It will give you an idea of how accurate the other results are.", 'p3-profiler' ); ?>">
927
  <strong><?php _e( 'Margin of Error:', 'p3-profiler' ); ?></strong>
928
  </td>
929
+ <td class="moe-data">
930
  <?php printf( '%.4f', self::$profile->averages['drift'] ); ?><?php _e( 'seconds', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
931
  <br />
932
  <em class="p3-em">
933
+ (<span class="qtip-tip moe-observed" title="<?php esc_attr_e( "How long the site took to load. This is an observed measurement (start timing when the page was requested, stop timing when the page was delivered to the browser, calculate the difference).", 'p3-profiler' ); ?>"><?php printf( '%.4f', self::$profile->averages['observed'] ); ?> <?php _e( 'observed', 'p3-profiler' ); ?></span>,
934
+ <span class="qtip-tip moe-expected" title="<?php esc_attr_e( "The expected site load time calculated by adding plugin load time, core load time, theme load time, and profiler overhead.", 'p3-profiler' ); ?>"><?php printf( '%.4f', self::$profile->averages['expected'] ); ?> <?php _e( 'expected', 'p3-profiler' ); ?></span>)
935
  </em>
936
  </td>
937
  </tr>
938
  <tr class="advanced">
939
+ <td class="qtip-tip visits-label" title="<?php esc_attr_e( "The number of visits registered during a profiling session. More visits produce a more accurate summary.", 'p3-profiler' ); ?>">
940
  <strong><?php _e( 'Visits:', 'p3-profiler' ); ?></strong>
941
  </td>
942
+ <td class="visits-data">
943
  <?php echo number_format( self::$profile->visits ); ?>
944
  </td>
945
  </tr>
946
  <tr class="advanced">
947
+ <td class="qtip-tip num-ticks-label" title="<?php esc_attr_e( "The number of PHP ticks recorded during the profiling session. A tick is loosely correlated to a PHP statement or function call. Fewer is better.", 'p3-profiler' ); ?>">
948
  <strong><?php _e ( 'Number of PHP ticks:', 'p3-profiler' ); ?></strong>
949
  </td>
950
+ <td class="num-ticks-data">
951
  <?php echo number_format( self::$profile->averages['plugin_calls'] ); ?> <?php _e( 'calls', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
952
  </td>
953
  </tr>
954
  <tr>
955
+ <td class="qtip-tip mu-label" title="<?php esc_attr_e( "The amount of RAM usage observed. This is reported by memory_get_peak_usage(). Lower is better.", 'p3-profiler' ); ?>">
956
  <strong><?php _e( 'Memory Usage:', 'p3-profiler' ); ?></strong>
957
  </td>
958
+ <td class="mu-data">
959
  <?php echo number_format( self::$profile->averages['memory'] / 1024 / 1024, 2 ); ?> <?php _ex( 'MB', 'Abbreviation for megabytes', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
960
  </td>
961
  </tr>
962
  <tr>
963
+ <td class="qtip-tip mq-label" title="<?php esc_attr_e( "The count of queries sent to the database. This is reported by the WordPress function get_num_queries(). Lower is better.", 'p3-profiler' ); ?>">
964
  <strong><?php _e( 'MySQL Queries:', 'p3-profiler' ); ?></strong>
965
  </td>
966
+ <td class="mq-data">
967
  <?php echo round( self::$profile->averages['queries'] ); ?> <?php _e( 'queries', 'p3-profiler' ); ?> <em class="p3-em"><?php _ex( 'avg.', "Abbreviation for 'average'", 'p3-profiler' ); ?></em>
968
  </td>
969
  </tr>
1062
  <!-- Email sending dialog -->
1063
  <div id="p3-email-sending-dialog" class="p3-dialog">
1064
  <div id="p3-email-sending-loading">
1065
+ <img src="<?php echo get_site_url() . '/wp-admin/images/loading.gif' ?>" height="16" width="16" title="<?php esc_attr_e( 'Loading', 'p3-profiler' ); ?>" alt="<?php esc_attr_e( 'Loading', 'p3-profiler' ); ?>" />
1066
  </div>
1067
  <div id="p3-email-sending-error">
1068
  <?php _e( 'There was a problem sending the e-mail:', 'p3-profiler' ); ?> <span id="p3-email-error"></span>
1071
  <?php _e( 'Your report was sent successfully to', 'p3-profiler' ); ?> <span id="p3-email-success-recipient"></span>
1072
  </div>
1073
  <div id="p3-email-sending-close">
1074
+ <input type="checkbox" id="p3-email-sending-close-submit" checked="checked" /><label for="p3-email-sending-close-submit" class="p3-email-sending-close"><?php _e( 'Done', 'p3-profiler' ); ?></label>
1075
  </div>
1076
  </div>
1077