89% php-console-log

Code Review | PHP Console Log

WordPress plugin PHP Console Log scored89%from 54 tests.

About plugin

  • Plugin page: php-console-log
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 10, 2019
  • Latest release: Feb 7, 2020
  • Number of updates: 6
  • Update frequency: every 35.3 days
  • Top authors: marcusviar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,839 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.29ms] Passed 4 tests

Analyzing server-side resources used by PHP Console Log
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.19 ▲0.24
Dashboard /wp-admin3.32 ▲0.0247.32 ▲1.59
Posts /wp-admin/edit.php3.37 ▲0.0147.78 ▲6.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.80 ▼9.27
Media Library /wp-admin/upload.php3.24 ▲0.0133.83 ▼1.70
PHP Console Log Help /wp-admin/admin.php?page=php-console-log-help3.2131.14

Server storage [IO: ▲2.11MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for PHP Console Log
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲16113.58 ▼0.719.25 ▲7.6141.77 ▼1.99
Dashboard /wp-admin2,210 ▲225.87 ▲0.98106.07 ▼0.6141.37 ▼1.06
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0134.95 ▲0.5031.79 ▼1.48
Add New Post /wp-admin/post-new.php1,521 ▲223.19 ▲0.01612.86 ▼60.0557.77 ▲5.49
Media Library /wp-admin/upload.php1,395 ▲134.19 ▼0.00100.52 ▼6.8942.92 ▼3.44
PHP Console Log Help /wp-admin/admin.php?page=php-console-log-help1,1132.0624.0230.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

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

"PHP Console Log" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
127 characters long description:
Log PHP variables and arrays to the web console in your browser via JavaScript's console.log(). No browser extensions required.

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
Everything looks great! No dangerous files found in this plugin424 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP665198301
JavaScript1375649
CSS19044
SVG10030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 2.05MB with 1.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png774.06KB295.93KB▼ 61.77%
assets/screenshot-1.png46.48KB18.22KB▼ 60.79%
assets/banner-1544x500-rtl.png774.06KB295.93KB▼ 61.77%
assets/icon-256x256.png4.55KB1.52KB▼ 66.52%
assets/banner-772x250.png248.58KB84.10KB▼ 66.17%