68% wp-console

Code Review | WP Console - WordPress PHP Console powered by PsySH

WordPress plugin WP Console - WordPress PHP Console powered by PsySH scored68%from 54 tests.

About plugin

  • Plugin page: wp-console
  • Plugin version: 2.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.12-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 21
  • Update frequency: every 76.9 days
  • Top authors: ediamin (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /942,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.52ms] Passed 4 tests

Analyzing server-side resources used by WP Console - WordPress PHP Console powered by PsySH
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.74 ▼1.73
Dashboard /wp-admin3.34 ▲0.0444.67 ▼2.44
Posts /wp-admin/edit.php3.46 ▲0.1048.38 ▲1.66
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.63 ▼1.61
Media Library /wp-admin/upload.php3.27 ▲0.0436.02 ▼0.31
WP Console /wp-admin/tools.php?page=wp-console3.2433.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Console - WordPress PHP Console powered by PsySH
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,244 ▲48221.52 ▲7.3829.02 ▲27.3036.33 ▼10.50
Dashboard /wp-admin2,369 ▲1898.09 ▲2.45109.77 ▲23.0038.51 ▲2.47
Posts /wp-admin/edit.php2,269 ▲1667.54 ▲5.6070.96 ▲28.1935.49 ▼2.04
Add New Post /wp-admin/post-new.php1,729 ▲20224.10 ▲1.11511.54 ▼104.9033.96 ▼19.27
Media Library /wp-admin/upload.php1,664 ▲2708.66 ▲4.44130.68 ▲30.5940.04 ▼4.30
WP Console /wp-admin/tools.php?page=wp-console9327.0750.1923.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-console/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 390× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-console/vendor/symfony/console/Exception/CommandNotFoundException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Psy\\CodeCleaner\\CodeCleanerPass' not found in wp-content/plugins/wp-console/vendor/psy/psysh/src/CodeCleaner/MagicConstantsPass.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt\\TraitUseAdaptation' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\Cast' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psy\\Readline\\Readline' not found in wp-content/plugins/wp-console/vendor/psy/psysh/src/Readline/Transient.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpParser\\Builder' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/wp-console/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Output\\OutputInterface' not found in wp-content/plugins/wp-console/vendor/symfony/console/Output/NullOutput.php:25

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: psysh, dump, console, browser, repl...

wp-console/wp-console.php Passed 13 tests

The principal PHP file in "WP Console - WordPress PHP Console powered by PsySH" v. 2.4.1 is loaded by WordPress automatically on each request
56 characters long description:
An in-browser PHP console for WordPress powered by PsySH

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/wp-console/vendor/symfony/console/Resources/bin/hiddeninput.exe
44,921 lines of code in 579 files:
LanguageFilesBlank linesComment linesLines of code
PHP5439,23217,34641,523
yacc3284121,791
JSON900817
Markdown111310440
C1528223
JavaScript94145
m41111141
C/C++ Header112840
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.01
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces75
Interfaces37
Traits5
Classes475
▷ Abstract classes347.16%
▷ Concrete classes44192.84%
▷ Final classes61.36%
Methods3,679
▷ Static methods3288.92%
▷ Public methods1,85050.29%
▷ Protected methods1,52341.40%
▷ Private methods3068.32%
Functions157
▷ Named functions5736.31%
▷ Anonymous functions10063.69%
Constants365
▷ Global constants102.74%
▷ Class constants35597.26%
▷ Public constants355100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin