68% support-monitor

Code Review | Support Monitor - WordPress Support Monitor Plugin

WordPress plugin Support Monitor - WordPress Support Monitor Plugin scored68%from 54 tests.

About plugin

  • Plugin page: support-monitor
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Apr 24, 2022
  • Number of updates: 10
  • Update frequency: every 34.9 days
  • Top authors: emtiazzahid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Support Monitor - WordPress Support Monitor Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.84 ▼5.87
Dashboard /wp-admin3.52 ▲0.2247.68 ▼5.67
Posts /wp-admin/edit.php3.57 ▲0.2251.07 ▲4.78
Add New Post /wp-admin/post-new.php6.07 ▲0.1884.30 ▼4.88
Media Library /wp-admin/upload.php3.38 ▲0.1536.84 ▲1.43

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 1 new table, 8 new options
New tables
wp_sm_plugins
New WordPress options
supportmonitor_installed
supportmonitor_version
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Support Monitor - WordPress Support Monitor Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.76 ▲0.151.95 ▼0.0044.49 ▼2.49
Dashboard /wp-admin2,223 ▲465.56 ▼0.0383.86 ▼3.2338.88 ▲0.64
Posts /wp-admin/edit.php2,128 ▲281.97 ▼0.0437.81 ▼0.9135.97 ▲1.03
Add New Post /wp-admin/post-new.php1,549 ▲2323.23 ▼0.27673.98 ▼11.7949.92 ▼6.87
Media Library /wp-admin/upload.php1,428 ▲284.16 ▼0.0594.62 ▼8.4542.52 ▼0.38
Unresolved Issues /wp-admin/admin.php?page=support-monitor#/9102.4653.7031.89
Plugin List /wp-admin/admin.php?page=support-monitor#/plugins8782.5344.2427.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_sm_plugins
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • supportmonitor_installed
    • widget_recent-comments
    • supportmonitor_version

Smoke tests 50% 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'SupportMonitor\\App\\Services\\Service' not found in wp-content/plugins/support-monitor/includes/Services/SupportService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/support-monitor/includes/Api/UnresolvedIssues.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/support-monitor/includes/Api/Plugins.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SupportMonitor\\App\\Models\\BaseModel' not found in wp-content/plugins/support-monitor/includes/Models/SMPlugins.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/support-monitor/includes/Api.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs\\ORM\\Eloquent\\Model' not found in wp-content/plugins/support-monitor/includes/Models/BaseModel.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support-monitor#/plugins
    • > Network (severe)
    wp-content/plugins/support-monitor/assets/css/admin.css?ver=1.0.3 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support-monitor#/plugins
    • > Network (severe)
    wp-json/supportmonitor/v1/api/plugins?_locale=user - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (All plugins will show with unresolved issues within given hour)
The official readme.txt might help

support-monitor/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Support Monitor - WordPress Support Monitor Plugin" version 1.0.3
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("support-monitor.php" instead of "plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin14,097 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
JSON40012,235
PHP202907081,110
Vuejs Component6341371
JavaScript152930236
CSS32210121
Markdown111021
Sass1013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes17.14%
Methods88
▷ Static methods1921.59%
▷ Public methods7989.77%
▷ Protected methods22.27%
▷ Private methods77.95%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.45MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png11.27KB5.00KB▼ 55.68%
assets/screenshot-1.png24.38KB12.42KB▼ 49.06%
assets/icon-128x128.png5.67KB2.65KB▼ 53.29%
assets/banner-772x250.png116.49KB32.80KB▼ 71.84%
assets/banner-1544x500.png304.42KB84.74KB▼ 72.16%