90% wp-disable-console-logs

Code Review | WP Disable Console Logs

WordPress plugin WP Disable Console Logs scored 90% from 54 tests.

About plugin

  • Plugin page: wp-disable-consol...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2019
  • Latest release: Nov 20, 2019
  • Number of updates: 2
  • Update frequency: every 8.5 days
  • Top authors: eastsidecode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 577 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.83ms] Passed 4 tests

Analyzing server-side resources used by WP Disable Console Logs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.02 ▼1.28
Dashboard /wp-admin3.31 ▲0.0148.09 ▲0.80
Posts /wp-admin/edit.php3.36 ▲0.0055.70 ▲7.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.93 ▼16.70
Media Library /wp-admin/upload.php3.23 ▲0.0040.46 ▲5.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Disable Console Logs
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.18 ▼1.111.92 ▼0.5342.47 ▼7.63
Dashboard /wp-admin2,206 ▲214.83 ▼1.10107.29 ▲8.4436.49 ▼9.66
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0439.02 ▼2.9134.15 ▼0.79
Add New Post /wp-admin/post-new.php1,533 ▼1123.36 ▲5.12668.99 ▲70.2559.56 ▲5.91
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0094.39 ▼1.1242.34 ▼3.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: prevent console logs

wp-disable-console-logs/index.php 92% from 13 tests

"WP Disable Console Logs" version 1.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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-disable-console-logs.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin