84% hw-monitor

Code Review | HW Monitor

WordPress plugin HW Monitor scored84%from 54 tests.

About plugin

  • Plugin page: hw-monitor
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: May 8, 2019
  • Number of updates: 25
  • Update frequency: every 8.6 days
  • Top authors: pressmaninc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.73ms] Passed 4 tests

Server-side resources used by HW Monitor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.68 ▼2.53
Dashboard /wp-admin3.32 ▲0.0243.64 ▼6.71
Posts /wp-admin/edit.php3.37 ▲0.0150.47 ▲3.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.60 ▼1.03
Media Library /wp-admin/upload.php3.24 ▲0.0136.11 ▼0.65
HW Monitor /wp-admin/tools.php?page=hw-monitor/hw-monitor.php3.2531.25

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
hw-monitor_version
can_compress_scripts
hw-monitor_options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

HW Monitor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.67 ▼0.741.76 ▼0.0244.71 ▲0.04
Dashboard /wp-admin2,210 ▲254.85 ▼0.07107.42 ▼7.7139.61 ▼8.30
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0539.72 ▲3.6734.29 ▲0.23
Add New Post /wp-admin/post-new.php1,517 ▼2117.74 ▼5.46667.22 ▼9.2348.57 ▼4.23
Media Library /wp-admin/upload.php1,386 ▲14.20 ▼0.0995.39 ▼8.0442.51 ▼0.12
HW Monitor /wp-admin/tools.php?page=hw-monitor/hw-monitor.php3,7707.19211.0783.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hw-monitor/addon/memory.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Pressman\\plugin_dir_path() in wp-content/plugins/hw-monitor/hw-monitor.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/hw-monitor/admin/page-setting.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/hw-monitor/admin/page-base.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hw-monitor/admin/page-addons.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hw-monitor/addon/filesystem.php:75
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hw-monitor/admin/page-monitor.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hw-monitor/addon/cpu.php:175

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: filesystem, hardware, monitor, memory, pressman...

hw-monitor/hw-monitor.php Passed 13 tests

The primary PHP file in "HW Monitor" version 1.1.3 is used by WordPress to initiate all plugin functionality
86 characters long description:
Displays performance monitor, such as the Microsoft Windows Task Manager on WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin691 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP89192406
PO File14648106
Sass224096
JavaScript4121080
CSS3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin