79% intervention

Code Review | Intervention

WordPress plugin Intervention scored 79% from 54 tests.

About plugin

  • Plugin page: intervention
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2023
  • Latest release: Jul 12, 2023
  • Number of updates: 4
  • Update frequency: every 101.5 days
  • Top authors: darrenjacoby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 480 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.87ms] Passed 4 tests

Server-side resources used by Intervention
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.11 ▼1.35
Dashboard /wp-admin3.46 ▲0.1649.03 ▼3.16
Posts /wp-admin/edit.php3.51 ▲0.1644.00 ▼6.10
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.77 ▼12.86
Media Library /wp-admin/upload.php3.32 ▲0.1035.06 ▲2.10
Intervention /wp-admin/tools.php?page=intervention3.3032.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 573 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Intervention
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.14 ▼1.234.59 ▲2.4943.57 ▼0.07
Dashboard /wp-admin2,215 ▲274.90 ▼0.2299.18 ▼10.0642.33 ▲0.83
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0334.61 ▼5.1130.50 ▼4.52
Add New Post /wp-admin/post-new.php1,542 ▲923.30 ▲0.13677.63 ▼11.2463.07 ▲1.91
Media Library /wp-admin/upload.php1,392 ▲44.13 ▼0.1091.78 ▼13.0241.34 ▼2.70
Intervention /wp-admin/tools.php?page=intervention1,0127.19192.1334.60

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/intervention/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 265× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Expr' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Expr\\BinaryOp' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Expr' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Stmt\\ClassLike' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\\Builder\\Declaration' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Scalar\\MagicConst' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Expr\\BinaryOp' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\PhpParser\ode\\Stmt' not found in wp-content/plugins/intervention/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Jacoby\\Intervention\\Brick\\VarExporter\\Internal\\ObjectExporter' not found in wp-content/plugins/intervention/vendor/brick/varexporter/src/Internal/ObjectExporter/ClosureExporter.php:22

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: minimal, options, wp-admin, version control, settings...

intervention/intervention.php Passed 13 tests

The principal PHP file in "Intervention" v. 2.0.0 is loaded by WordPress automatically on each request
60 characters long description:
Easily customize wp-admin and configure application options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin28,812 lines of code in 561 files:
LanguageFilesBlank linesComment linesLines of code
PHP5452,68816,32126,095
yacc3336122,050
JSON600572
Markdown349091
JavaScript3013
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.71
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces91
Interfaces123
Traits3
Classes396
▷ Abstract classes194.80%
▷ Concrete classes37795.20%
▷ Final classes184.77%
Methods2,532
▷ Static methods1646.48%
▷ Public methods2,12083.73%
▷ Protected methods35413.98%
▷ Private methods582.29%
Functions1,400
▷ Named functions392.79%
▷ Anonymous functions1,36197.21%
Constants237
▷ Global constants52.11%
▷ Class constants23297.89%
▷ Public constants232100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected