Plugin Directory

Changeset 2085895


Ignore:
Timestamp:
05/11/2019 12:23:13 PM (7 years ago)
Author:
wsec1
Message:

0.6.5 ttfb calculation (calculated on latest page or blog post url)

Location:
super-host-speed-benchmark/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • super-host-speed-benchmark/trunk/readme.txt

    r2085883 r2085895  
    52520.6.3 Report version number and stats
    53530.6.4 Added ttfb calculation (calculated on latest blog post url)
     540.6.5 ttfb calculation (calculated on latest page or blog post url)
    5455
  • super-host-speed-benchmark/trunk/shsb.php

    r2085883 r2085895  
    44* Plugin URI: https://superhostspeed.com/
    55* Description: Test and benchmark the speed of your hosting provider, based on the speed of their mysql database, which tends to be the main cause of Wordpress being slow on some hosts. A score of less than 40 is bad and a score of more than 100 is very good. Scores will be reported to our server in future versions so you can compare speeds with others. See Tools/Speed Benchmark
    6 * Version: 0.6.4
     6* Version: 0.6.5
    77* License: GPL2+
    88* Copyright 2019 Anthony Walker
     
    215215   
    216216 
    217     global $post;
    218     $placeholder = $post;
     217   
     218   
     219   
    219220    $args = array(
     221        'number'     => 1,
     222        'offset'          => 0,
     223        'orderby'         => 'post_date',
     224        'order'           => 'DESC',
     225        'post_status'     => 'publish' );
     226    $sorted_posts = get_posts( $args );
     227    $url = get_permalink($sorted_posts[0]->ID);
     228   
     229    if (!url)
     230    {
     231        $args = array(
    220232        'numberposts'     => 1,
    221233        'offset'          => 0,
     
    225237    $sorted_posts = get_posts( $args );
    226238    $url = get_permalink($sorted_posts[0]->ID);
     239    }
     240   
     241   
    227242   
    228243    $ttfb=shsb_get_ttfb($url);
Note: See TracChangeset for help on using the changeset viewer.