10% hosting-stability-meter

Code Review | Hosting Stability Meter

WordPress plugin Hosting Stability Meter scored10%from 54 tests.

About plugin

  • Plugin page: hosting-stability...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Sep 1, 2020
  • Number of updates: 7
  • Update frequency: every 19.1 days
  • Top authors: znaeff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/hosting-stability-meter/class.hosting-stability-meter.php+100
    Non-static method HostingStabilityMeter::get_settings() should not be called statically

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.26ms] Passed 4 tests

Analyzing server-side resources used by Hosting Stability Meter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1145.43 ▼2.59
Dashboard /wp-admin3.49 ▲0.1853.24 ▼1.90
Posts /wp-admin/edit.php3.60 ▲0.2457.63 ▲7.26
Add New Post /wp-admin/post-new.php6.07 ▲0.1896.77 ▼10.39
Media Library /wp-admin/upload.php3.41 ▲0.1841.52 ▲5.84
Hosting Stability Meter /wp-admin/tools.php?page=hosting-stability-meter3.3632.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Hosting Stability Meter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.72 ▼0.011.78 ▼0.4544.33 ▼2.21
Dashboard /wp-admin2,199 ▲225.65 ▲0.0492.65 ▼9.6141.23 ▼3.87
Posts /wp-admin/edit.php2,107 ▲72.01 ▼0.0143.64 ▲3.1134.70 ▼3.45
Add New Post /wp-admin/post-new.php1,531 ▲523.22 ▲0.36635.85 ▼70.9758.56 ▼12.19
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.05103.48 ▼3.0341.54 ▼4.34
Hosting Stability Meter /wp-admin/tools.php?page=hosting-stability-meter1,6175.91205.7871.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_hostingstabilitymeter_stat
  • This plugin does not fully uninstall, leaving 8 options in the database
    • hostingstabilitymeter_host_hash
    • can_compress_scripts
    • theysaidso_admin_options
    • hostingstabilitymeter_tests_made
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HostingStabilityMeterAdmin::display_page() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-content/plugins/hosting-stability-meter/views/stat.php+19
    Non-static method HostingStabilityMeterAdmin::echo_current_locale() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-content/plugins/hosting-stability-meter/views/stat.php+113
    Non-static method HostingStabilityMeterAdmin::echo_graph_data() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_th_cpu() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-content/plugins/hosting-stability-meter/class.hosting-stability-meter-admin.php+164
    Non-static method HostingStabilityMeter::get_settings() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_th_disk() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-content/plugins/hosting-stability-meter/class.hosting-stability-meter.php+324
    Non-static method HostingStabilityMeter::sanitize_settings() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_th_db() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_interval_test() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_allow_mail() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-content/plugins/hosting-stability-meter/class.hosting-stability-meter-admin.php+170
    Non-static method HostingStabilityMeterAdmin::echo_field_description() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_mail_addr() should not be called statically
    • > GET request to /wp-admin/tools.php?page=hosting-stability-meter
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method HostingStabilityMeterAdmin::echo_settings_section_main_allow_send() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/hosting-stability-meter/views/stat.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_main_site() in wp-content/plugins/hosting-stability-meter/hosting-stability-meter.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: benchmark, hosting, hardware, rating, speed...

hosting-stability-meter/hosting-stability-meter.php 92% from 13 tests

The primary PHP file in "Hosting Stability Meter" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 181 characters long)

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
No dangerous file extensions were detected1,148 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51151841,122
HTML10026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity49.33
▷ Minimum class complexity27.00
▷ Maximum class complexity68.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1748.57%
▷ Public methods3188.57%
▷ Protected methods00.00%
▷ Private methods411.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants58
▷ Global constants11.72%
▷ Class constants5798.28%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin