58% super-host-speed-benchmark

Code Review | Super Host Speed Benchmark

WordPress plugin Super Host Speed Benchmark scored58%from 54 tests.

About plugin

  • Plugin page: super-host-speed-...
  • Plugin version: 0.6.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2019
  • Latest release: Nov 7, 2019
  • Number of updates: 18
  • Update frequency: every 11.3 days
  • Top authors: wsec1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,222 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲4.73ms] 75% from 4 tests

Analyzing server-side resources used by Super Host Speed Benchmark
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 9,331.65ms on /wp-admin/tools.php?page=speedbenchmark)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.21 ▲9.28
Dashboard /wp-admin3.35 ▲0.0554.00 ▲5.48
Posts /wp-admin/edit.php3.40 ▲0.0558.09 ▲7.80
Add New Post /wp-admin/post-new.php5.93 ▲0.05104.33 ▲4.12
Media Library /wp-admin/upload.php3.28 ▲0.0534.66 ▲1.50
Speed Benchmark /wp-admin/tools.php?page=speedbenchmark3.259,331.65
Super Host Speed Benchmark /wp-admin/options-general.php?page=super-host-speed-benchmark3.2231.22

Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_speedtest202
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Super Host Speed Benchmark: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.31 ▼0.942.13 ▲0.3350.56 ▲8.51
Dashboard /wp-admin2,214 ▲265.83 ▼0.01126.88 ▲29.8145.24 ▲0.48
Posts /wp-admin/edit.php2,097 ▲52.00 ▼0.1844.86 ▼3.7843.86 ▲1.89
Add New Post /wp-admin/post-new.php1,540 ▼223.29 ▲5.05797.03 ▲193.7057.70 ▲6.31
Media Library /wp-admin/upload.php1,393 ▲84.28 ▲0.08116.17 ▲9.9248.11 ▲3.04
Speed Benchmark /wp-admin/tools.php?page=speedbenchmark1,0062.1663.9255.46
Super Host Speed Benchmark /wp-admin/options-general.php?page=super-host-speed-benchmark7942.0624.7026.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'shsb_uninstall' not found or invalid function name
  • Zombie tables detected upon uninstall: 1 table
    • wp_speedtest202
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=super-host-speed-benchmark
    • > Notice in wp-content/plugins/super-host-speed-benchmark/shsb.php+93
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/tools.php?page=speedbenchmark
    • > Warning in wp-content/plugins/super-host-speed-benchmark/shsb.php+253
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/tools.php?page=speedbenchmark
    • > Warning in wp-content/plugins/super-host-speed-benchmark/shsb.php+253
    file_get_contents(https://superhostspeed.com/benchmark.php?score=34.214&h=&o=&host=ubuntu&ip=127.0.0.1&httphost=wp.com&version=0.6.7&w=6361&r=27853&ttfb=0.028275): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-host-speed-benchmark/shsb.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: benchmark, speed benchmark, slow, speed test, performance...

super-host-speed-benchmark/shsb.php 85% from 13 tests

The principal PHP file in "Super Host Speed Benchmark" v. 0.6.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("super-host-speed-benchmark.php" instead of "shsb.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 366 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin268 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP113842267
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.41MB with 0.23MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.PNG9.02KB5.28KB▼ 41.47%
assets/banner-772x250.png414.75KB135.79KB▼ 67.26%