Changeset 2085895
- Timestamp:
- 05/11/2019 12:23:13 PM (7 years ago)
- Location:
- super-host-speed-benchmark/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
shsb.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
super-host-speed-benchmark/trunk/readme.txt
r2085883 r2085895 52 52 0.6.3 Report version number and stats 53 53 0.6.4 Added ttfb calculation (calculated on latest blog post url) 54 0.6.5 ttfb calculation (calculated on latest page or blog post url) 54 55 -
super-host-speed-benchmark/trunk/shsb.php
r2085883 r2085895 4 4 * Plugin URI: https://superhostspeed.com/ 5 5 * 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. 46 * Version: 0.6.5 7 7 * License: GPL2+ 8 8 * Copyright 2019 Anthony Walker … … 215 215 216 216 217 global $post; 218 $placeholder = $post; 217 218 219 219 220 $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( 220 232 'numberposts' => 1, 221 233 'offset' => 0, … … 225 237 $sorted_posts = get_posts( $args ); 226 238 $url = get_permalink($sorted_posts[0]->ID); 239 } 240 241 227 242 228 243 $ttfb=shsb_get_ttfb($url);
Note: See TracChangeset
for help on using the changeset viewer.