84% pretty-debug

Code Review | Pretty Debug

WordPress plugin Pretty Debug scored 84% from 54 tests.

About plugin

  • Plugin page: pretty-debug
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2013
  • Latest release: Jul 12, 2013
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: wycks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.25MB] [CPU: ▼4.18ms] Passed 4 tests

An overview of server-side resources used by Pretty Debug
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2540.85 ▲0.26
Dashboard /wp-admin3.55 ▲0.2553.47 ▲0.36
Posts /wp-admin/edit.php3.66 ▲0.3146.81 ▲0.60
Add New Post /wp-admin/post-new.php6.13 ▲0.2483.08 ▼17.95
Media Library /wp-admin/upload.php3.47 ▲0.2435.68 ▲2.09

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Pretty Debug
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7513.19 ▼1.192.41 ▲0.4442.31 ▼3.19
Dashboard /wp-admin2,206 ▲154.89 ▲0.02111.44 ▲2.2643.28 ▲1.34
Posts /wp-admin/edit.php2,086 ▼61.99 ▲0.0035.28 ▲0.6131.78 ▼1.63
Add New Post /wp-admin/post-new.php1,514 ▼1417.62 ▼5.63674.22 ▼35.8948.01 ▼5.19
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0894.52 ▼9.5843.36 ▼3.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/pretty-debug/php-ref/tests/index.php
    • > /wp-content/plugins/pretty-debug/pretty-debug.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === pretty-debug === )
  • Screenshots: Screenshot #1 (A screenshot with mouseover) image not found
The official readme.txt might help

pretty-debug/pretty-debug.php Passed 13 tests

The principal PHP file in "Pretty Debug" v. 1.0 is loaded by WordPress automatically on each request
40 characters long description:
Pretty debug for var_dumps and print_r's

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,820 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP46576371,330
CSS27442405
JavaScript19050
Markdown121035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity88.20
▷ Minimum class complexity1.00
▷ Maximum class complexity433.00
Average method complexity6.34
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes133.33%
Methods36
▷ Static methods1336.11%
▷ Public methods2466.67%
▷ Protected methods1130.56%
▷ Private methods12.78%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin