84% wp-php-console

Code Review | WP PHP Console

WordPress plugin WP PHP Console scored84%from 54 tests.

About plugin

  • Plugin page: wp-php-console
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Jan 18, 2015
  • Latest release: Nov 9, 2020
  • Number of updates: 43
  • Update frequency: every 49.4 days
  • Top authors: nekojira (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /52,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.67ms] Passed 4 tests

A check of server-side resources used by WP PHP Console
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.40 ▼6.02
Dashboard /wp-admin3.34 ▲0.0444.05 ▼3.45
Posts /wp-admin/edit.php3.46 ▲0.1046.51 ▲0.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.27 ▼13.80
Media Library /wp-admin/upload.php3.27 ▲0.0436.36 ▲2.50
WP PHP Console /wp-admin/options-general.php?page=wp_php_console3.2330.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP PHP Console
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.44 ▲0.081.58 ▼0.3537.86 ▼7.81
Dashboard /wp-admin2,216 ▲425.83 ▼0.03101.90 ▼1.6740.84 ▲1.38
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.1136.82 ▼3.7531.70 ▼5.86
Add New Post /wp-admin/post-new.php1,533 ▲1923.26 ▲5.45653.61 ▼25.7455.49 ▲5.82
Media Library /wp-admin/upload.php1,404 ▲164.24 ▲0.0493.42 ▼7.7142.18 ▼3.83
WP PHP Console /wp-admin/options-general.php?page=wp_php_console9742.1523.4431.37

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/wp-php-console/vendor/wp-cli/package-command/package-command.php): failed to open stream: No such file or directory in wp-content/plugins/wp-php-console/vendor/composer/autoload_real_52.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Storage\\AllKeysList' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Storage/File.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/PsrLogger.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Dispatcher' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Dispatcher/Debug.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Storage\\AllKeysList' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Storage/Session.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Dispatcher' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Dispatcher/Evaluate.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Dispatcher' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Dispatcher/Errors.php:18
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/wp-php-console/vendor/wp-cli/package-command/package-command.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-php-console/vendor/composer/autoload_real_52.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Storage\\ExpiringKeyValue' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Storage/MongoDB.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Storage' not found in wp-content/plugins/wp-php-console/vendor/php-console/php-console/src/PhpConsole/Storage/AllKeysList.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: debug, dev, debugging, development, php...

wp-php-console/wp-php-console.php 92% from 13 tests

"WP PHP Console" version 1.6.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin5,714 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP437501,7255,573
JSON200102
XML15039

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.63
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes46
▷ Abstract classes715.22%
▷ Concrete classes3984.78%
▷ Final classes923.08%
Methods260
▷ Static methods4517.31%
▷ Public methods16764.23%
▷ Protected methods5621.54%
▷ Private methods3714.23%
Functions11
▷ Named functions327.27%
▷ Anonymous functions872.73%
Constants19
▷ Global constants15.26%
▷ Class constants1894.74%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected