94% debug-bar-post-meta

Code Review | Debug Bar Post Meta

WordPress plugin Debug Bar Post Meta scored 94% from 53 tests.

About plugin

  • Plugin page: debug-bar-post-meta
  • Plugin version: 0.5.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.5
  • WordPress version: 5.8.1
  • First release: May 23, 2013
  • Latest release: Aug 19, 2020
  • Number of updates: 13
  • Update frequency: every 203.5 days
  • Top authors: whyisjake (100%)

Code review

53 tests

User reviews

1 review

Install metrics

70+ active / 3,799 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Debug Bar Post Meta
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0035.24 ▲2.64
Dashboard /wp-admin3.06 ▲0.0143.47 ▼9.77
Posts /wp-admin/edit.php3.11 ▲0.0042.88 ▼0.37
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.89 ▼1,015.80
Media Library /wp-admin/upload.php3.00 ▼0.0028.31 ▼10.12

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Debug Bar Post Meta
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7216.24 ▲0.737.89 ▲0.3550.92 ▲0.76
Dashboard /wp-admin2,959 ▲1065.95 ▲0.11137.96 ▼11.16107.14 ▼0.10
Posts /wp-admin/edit.php2,703 ▼32.69 ▼0.1363.85 ▼3.7698.95 ▲6.29
Add New Post /wp-admin/post-new.php1,653 ▼418.77 ▼0.08365.31 ▲5.84110.64 ▲2.92
Media Library /wp-admin/upload.php1,775 ▲64.98 ▼0.03141.53 ▼7.56111.97 ▼12.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/debug-bar-post-meta/debug-bar-post-meta.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/debug-bar-post-meta/class-debug-bar-post-meta.php:15

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Sample of post meta.)
You can take inspiration from this readme.txt

debug-bar-post-meta/debug-bar-post-meta.php Passed 13 tests

The principal PHP file in "Debug Bar Post Meta" v. 0.5.8 is loaded by WordPress automatically on each request
41 characters long description:
Displays all of the post meta for a post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin3,792 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON3003,686
PHP2124347
Markdown112023
XML17514
JavaScript10013
CSS1009

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png256.75KB69.06KB▼ 73.10%