99% debug-bar-constants

Code Review | Debug Bar Constants

WordPress plugin Debug Bar Constants scored 99% from 54 tests.

About plugin

  • Plugin page: debug-bar-constants
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9
  • WordPress version: 5.8.1
  • First release: Apr 28, 2013
  • Latest release: Jan 22, 2018
  • Number of updates: 42
  • Update frequency: every 41.2 days
  • Top authors: jrf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 21,790 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼145.26ms] Passed 4 tests

Server-side resources used by Debug Bar Constants
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0035.73 ▲0.50
Dashboard /wp-admin3.06 ▲0.0053.27 ▲14.21
Posts /wp-admin/edit.php3.11 ▲0.0046.39 ▲3.93
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.01 ▼571.14
Media Library /wp-admin/upload.php3.00 ▼0.0125.66 ▼14.32

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Debug Bar Constants: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.90 ▲0.2312.40 ▲1.0244.60 ▼6.69
Dashboard /wp-admin2,973 ▲395.93 ▲0.01170.85 ▲20.23118.83 ▲9.21
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0071.06 ▲1.7791.76 ▲3.66
Add New Post /wp-admin/post-new.php3,636 ▲1,95315.01 ▼3.74479.13 ▲72.33110.67 ▼2.08
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02156.80 ▲7.86112.13 ▼10.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt is a good inspiration

debug-bar-constants/debug-bar-constants.php 92% from 13 tests

The main file in "Debug Bar Constants" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

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
Good job! No executable or dangerous file extensions detected1,615 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP93627231,323
PO File24880122
CSS2128113
JavaScript251552
Markdown1205

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity16.38
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods38
▷ Static methods2463.16%
▷ Public methods2565.79%
▷ Protected methods12.63%
▷ Private methods1231.58%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ui.totop.png51.59KB1.82KB▼ 96.47%