10% console-log-cloaking

Code Review | Console Log Cloaking

WordPress plugin Console Log Cloakingscored10%from 54 tests.

About plugin

  • Plugin page: console-log-cloaking
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 3, 2020
  • Latest release: Jan 3, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: codecide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /767 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/console-log-cloaking/class/console_log_cloaking/console_log_cloaking.php+50
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.04ms] Passed 4 tests

This is a short check of server-side resources used by Console Log Cloaking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.81 ▼34.28
Dashboard /wp-admin2.11 ▼1.237.25 ▼48.13
Posts /wp-admin/edit.php2.12 ▼1.245.66 ▼39.06
Add New Post /wp-admin/post-new.php2.11 ▼3.777.20 ▼90.68
Media Library /wp-admin/upload.php2.12 ▼1.116.90 ▼25.12

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Console Log Cloaking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.28 ▼0.081.57 ▲0.1240.15 ▲1.38
Dashboard /wp-admin2,215 ▲405.54 ▼0.2082.83 ▼17.8339.87 ▼4.51
Posts /wp-admin/edit.php2,120 ▲202.00 ▼0.0335.03 ▼1.1134.50 ▲1.12
Add New Post /wp-admin/post-new.php1,544 ▲1823.39 ▲0.31690.14 ▲17.4753.19 ▼2.63
Media Library /wp-admin/upload.php1,414 ▲174.14 ▼0.0396.86 ▼5.6141.33 ▼4.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/console-log-cloaking/class/console_log_cloaking/console_log_cloaking.php+50
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === Console Log Cloaking=== )
The official readme.txt is a good inspiration

console-log-cloaking/console_log_cloaking.php 92% from 13 tests

"Console Log Cloaking" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("console-log-cloaking.php" instead of "console_log_cloaking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin274 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31957240
JavaScript15022
CSS12112

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.43
Average class complexity17.50
▷ Minimum class complexity8.00
▷ Maximum class complexity27.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1275.00%
▷ Protected methods16.25%
▷ Private methods318.75%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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