84% supervisor

Code Review | Supervisor

WordPress plugin Supervisor scored84%from 54 tests.

About plugin

  • Plugin page: supervisor
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2023
  • Latest release: Nov 14, 2023
  • Number of updates: 11
  • Update frequency: every 24.1 days
  • Top authors: tiagohillebrandt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /252 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.31MB] [CPU: ▼5.87ms] Passed 4 tests

Server-side resources used by Supervisor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2938.90 ▼3.69
Dashboard /wp-admin3.69 ▲0.3450.29 ▼12.79
Posts /wp-admin/edit.php3.72 ▲0.3648.99 ▲0.08
Add New Post /wp-admin/post-new.php6.19 ▲0.3095.84 ▼7.08
Media Library /wp-admin/upload.php3.53 ▲0.3038.96 ▲7.47

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
supv_version
can_compress_scripts
supv_secure_login_settings
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Supervisor: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11514.37 ▲0.021.84 ▼0.0237.85 ▼6.24
Dashboard /wp-admin2,260 ▲895.60 ▼0.0694.84 ▼3.8843.32 ▲0.85
Posts /wp-admin/edit.php2,140 ▲402.03 ▲0.0141.42 ▲3.4734.88 ▼1.81
Add New Post /wp-admin/post-new.php1,563 ▲2723.57 ▲0.39638.85 ▲23.5953.95 ▲3.19
Media Library /wp-admin/upload.php1,443 ▲464.40 ▲0.20100.16 ▲4.2443.23 ▲1.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • 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)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Cards/AutoloadCardView.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/SystemInfoView.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Cards/WordPressCardView.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Cards/SecureLoginCardView.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Cards/TransientsCardView.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Pages/DashboardView.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Notices/SSLView.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SUPV\\Admin\\Views\\AbstractView' not found in wp-content/plugins/supervisor/src/Admin/Views/Notices/HTTPSView.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #1 is required in supervisor/assets to your readme.txt
You can take inspiration from this readme.txt

supervisor/supervisor.php Passed 13 tests

Analyzing the main PHP file in "Supervisor" version 1.3.0
80 characters long description:
A plugin to help improve the performance and security of your WordPress install.

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
No dangerous file extensions were detected3,970 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP357341,6722,260
CSS22911,553
JavaScript23143135
SVG11016
JSON2006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.37
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes1661.54%
Methods150
▷ Static methods2315.33%
▷ Public methods13590.00%
▷ Protected methods00.00%
▷ Private methods1510.00%
Functions10
▷ Named functions660.00%
▷ Anonymous functions440.00%
Constants18
▷ Global constants633.33%
▷ Class constants1266.67%
▷ Public constants12100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/supervisor-logo.png11.21KB5.19KB▼ 53.74%