62% wp-hosting-performance-check

Code Review | wp Hosting Performance Check

WordPress plugin wp Hosting Performance Check scored62%from 54 tests.

About plugin

  • Plugin page: wp-hosting-perfor...
  • Plugin version: 2.18.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Aug 24, 2018
  • Number of updates: 201
  • Update frequency: every 3.6 days
  • Top authors: sfarrell5123 (98.01%)Otto42 (2.49%)

Code review

54 tests

User reviews

15 reviews

Install metrics

500+ active /35,423 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲6.25ms] Passed 4 tests

Server-side resources used by wp Hosting Performance Check
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1446.30 ▲2.71
Dashboard /wp-admin3.48 ▲0.1754.83 ▲4.11
Posts /wp-admin/edit.php3.59 ▲0.2458.97 ▲9.78
Add New Post /wp-admin/post-new.php6.07 ▲0.19105.12 ▲8.39
Media Library /wp-admin/upload.php3.40 ▲0.1751.75 ▲15.50
Top 10 Slow Urls /wp-admin/admin.php?page=wphpc_slowurls3.3837.57
Last 7 Days Graph /wp-admin/admin.php?page=7daysgraph3.6043.56
Hosting Compare /wp-admin/admin.php?page=wphpc_compare3.4134.10
Settings /wp-admin/admin.php?page=wphpc_settings3.3640.79
Hosting Check /wp-admin/admin.php?page=wphpc_graphs3.6040.99
Sysinfo /wp-admin/admin.php?page=wphpc_sysinfo3.6242.71
Load Test /wp-admin/admin.php?page=wphpc_loadtest_page3.4344.32
country /wp-admin/admin.php?page=wphpc_country3.3736.21
Last 30 Days Graph /wp-admin/admin.php?page=30daysgraph3.6044.70
Bot Analysis /wp-admin/admin.php?page=wphpc_page_bots3.4141.12

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 357 new files
Database: 1 new table, 6 new options
New tables
wp_webpages_data
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

wp Hosting Performance Check: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,026 ▲28013.77 ▼0.639.71 ▲7.8644.86 ▲1.09
Dashboard /wp-admin2,342 ▲1634.98 ▲0.12112.36 ▲0.6941.95 ▼4.76
Posts /wp-admin/edit.php2,210 ▲1182.42 ▲0.4340.80 ▲1.6139.41 ▲0.77
Add New Post /wp-admin/post-new.php1,628 ▲9517.55 ▼5.80706.08 ▲71.0639.77 ▼13.21
Media Library /wp-admin/upload.php1,527 ▲1424.35 ▲0.19130.62 ▲9.8551.76 ▼2.29
Top 10 Slow Urls /wp-admin/admin.php?page=wphpc_slowurls9911.8825.5956.34
Last 7 Days Graph /wp-admin/admin.php?page=7daysgraph1,4662.6067.0870.14
Hosting Compare /wp-admin/admin.php?page=wphpc_compare9281.8626.1426.34
Settings /wp-admin/admin.php?page=wphpc_settings1,3461.8827.3926.37
Hosting Check /wp-admin/admin.php?page=wphpc_graphs1,4492.5366.3464.75
Sysinfo /wp-admin/admin.php?page=wphpc_sysinfo1,2902.0741.2037.14
Load Test /wp-admin/admin.php?page=wphpc_loadtest_page1,1951.8825.5730.05
country /wp-admin/admin.php?page=wphpc_country9552.0127.1727.79
Last 30 Days Graph /wp-admin/admin.php?page=30daysgraph1,4662.5968.8166.23
Bot Analysis /wp-admin/admin.php?page=wphpc_page_bots1,0392.1028.6542.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_webpages_data
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wphpc_slowurls
    • > Notice in wp-content/plugins/wp-hosting-performance-check/top10.php+28
    Undefined variable: country
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wphpc_settings
    • > Notice in wp-content/plugins/wp-hosting-performance-check/wp_host_check.php+392
    Trying to access array offset on value of type bool
  • 99967 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wphpc_sysinfo
    • > Deprecated in wp-content/plugins/wp-hosting-performance-check/benchmark.php+104
    Invalid characters passed for attempted conversion, these have been ignored
    • > GET request to /wp-admin/admin.php?page=wphpc_sysinfo
    • > Notice in wp-content/plugins/wp-hosting-performance-check/sysinfo.php+110
    A non well formed numeric value encountered
    • > GET request to /wp-admin/admin.php?page=wphpc_sysinfo
    • > Warning in wp-content/plugins/wp-hosting-performance-check/sysinfo.php+116
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-hosting-performance-check/test.php
    • > /wp-content/plugins/wp-hosting-performance-check/enctest.php
    • > /wp-content/plugins/wp-hosting-performance-check/comparo2.php
    • > /wp-content/plugins/wp-hosting-performance-check/top10.php
    • > /wp-content/plugins/wp-hosting-performance-check/advertise.php
    • > /wp-content/plugins/wp-hosting-performance-check/piegraph.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: private_key in wp-content/plugins/wp-hosting-performance-check/enctest.php on line 23
    • > PHP Warning
      Use of undefined constant WPHPC__PLUGIN_URL - assumed 'WPHPC__PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-hosting-performance-check/advertise.php on line 5
    • > PHP Warning
      openssl_private_decrypt(): key parameter is not a valid private key in wp-content/plugins/wp-hosting-performance-check/enctest.php on line 23
    • > PHP Notice
      Undefined variable: wphpc_piedata in wp-content/plugins/wp-hosting-performance-check/piegraph.php on line 14
    • > PHP Warning
      openssl_public_encrypt(): key parameter is not a valid public key in wp-content/plugins/wp-hosting-performance-check/enctest.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% 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
10 plugin tags: speed, bot, graph, benchmark, version...

wp-hosting-performance-check/wp_host_check.php 92% from 13 tests

The principal PHP file in "wp Hosting Performance Check" v. 2.18.8 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-hosting-performance-check.php" instead of "wp_host_check.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected11,041 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript647034,776
CSS4602533,431
PHP338932762,834

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions66100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
250 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
iso/fj.png0.60KB0.74KB0.00%
iso/de.png0.53KB0.72KB0.00%
iso/gr.png0.48KB0.70KB0.00%
iso/ky.png0.63KB0.70KB0.00%
iso/gy.png0.63KB0.74KB0.00%