Skip to content

Instantly share code, notes, and snippets.

@adapicom
Created October 31, 2013 17:40
Show Gist options
  • Save adapicom/7253854 to your computer and use it in GitHub Desktop.
Save adapicom/7253854 to your computer and use it in GitHub Desktop.
add_action( 'wp_footer', 'tcb_note_server_side_page_speed' );
function tcb_note_server_side_page_speed() {
date_default_timezone_set( get_option( 'timezone_string' ) );
$content = '[ ' . date( 'Y-m-d H:i:s T' ) . ' ] ';
$content .= 'Page created in ';
$content .= timer_stop( $display = 0, $precision = 2 );
$content .= ' seconds from ';
$content .= get_num_queries();
$content .= ' queries';
if( ! current_user_can( 'administrator' ) ) $content = "<!-- $content -->";
echo $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment