83% wf-cpanel-right-now-site-health

Code Review | WebFacing™ - Storage, resource usage and errors in cPanel®

WordPress plugin WebFacing™ - Storage, resource usage and errors in cPanel® scored83%from 54 tests.

About plugin

  • Plugin page: wf-cpanel-right-n...
  • Plugin version: 3.7.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 229
  • Update frequency: every 4.6 days
  • Top authors: knutsp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /9,121 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▼1.50ms] Passed 4 tests

Server-side resources used by WebFacing™ - Storage, resource usage and errors in cPanel®
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4439.08 ▼6.50
Dashboard /wp-admin3.83 ▲0.4848.73 ▼12.18
Posts /wp-admin/edit.php3.87 ▲0.5154.57 ▲7.33
Add New Post /wp-admin/post-new.php6.34 ▲0.4598.14 ▲5.36
Media Library /wp-admin/upload.php3.68 ▲0.4541.17 ▲7.44

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WebFacing™ - Storage, resource usage and errors in cPanel®
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.25 ▼1.174.98 ▲2.9740.55 ▼6.01
Dashboard /wp-admin2,212 ▲244.86 ▼1.04100.49 ▼6.0839.10 ▼2.73
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0241.47 ▲3.9734.51 ▼1.53
Add New Post /wp-admin/post-new.php1,533 ▼023.39 ▲0.21657.10 ▼16.0049.52 ▼3.25
Media Library /wp-admin/upload.php1,388 ▼34.18 ▲0.0497.43 ▼5.1341.43 ▼1.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught TypeError: json_decode() expects parameter 1 to be string, null given in wp-content/plugins/wf-cpanel-right-now-site-health/admin/cpanel.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #4 (Dashboard - Resource usage & errors widget) image required
You can take inspiration from this readme.txt

wf-cpanel-right-now-site-health/index.php 77% from 13 tests

"WebFacing™ - Storage, resource usage and errors in cPanel®" version 3.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 360 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wf-cpanel-right-now-site-health.php" instead of "index.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.7.1" instead of "5.7")

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
No dangerous file extensions were detected1,963 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP93361251,892
JavaScript113071

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code1.03
Average class complexity116.75
▷ Minimum class complexity10.00
▷ Maximum class complexity331.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes4100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods42
▷ Static methods42100.00%
▷ Public methods1330.95%
▷ Protected methods2969.05%
▷ Private methods00.00%
Functions37
▷ Named functions1643.24%
▷ Anonymous functions2156.76%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin