77% debug-bar-cache-lookup

Code Review | Debug Bar Cache Lookup

WordPress plugin Debug Bar Cache Lookup scored77%from 54 tests.

About plugin

  • Plugin page: debug-bar-cache-l...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Apr 19, 2016
  • Number of updates: 3
  • Update frequency: every 135.0 days
  • Top authors: collinsinternet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,227 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Debug Bar Cache Lookup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.33 ▼1.91
Dashboard /wp-admin3.31 ▲0.0152.25 ▼1.45
Posts /wp-admin/edit.php3.36 ▲0.0151.31 ▼0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.42 ▼20.61
Media Library /wp-admin/upload.php3.23 ▲0.0037.42 ▲2.38

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Debug Bar Cache Lookup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.301.87 ▼0.1343.96 ▼0.87
Dashboard /wp-admin2,195 ▲215.57 ▼0.1084.74 ▼23.8739.44 ▼2.93
Posts /wp-admin/edit.php2,103 ▼01.96 ▼0.0739.69 ▲1.8135.19 ▲2.31
Add New Post /wp-admin/post-new.php1,526 ▼023.39 ▼0.26652.75 ▼44.3967.21 ▲10.17
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.04110.60 ▼5.5149.83 ▲1.67

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/debug-bar-cache-lookup/views/searchform.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/debug-bar-cache-lookup/includes/class-debug-bar-cache-lookup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/debug-bar-cache-lookup/debug_bar_cache_lookup.php:38

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 errors were detected

Optimizations

Plugin configuration 86% 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
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

debug-bar-cache-lookup/debug_bar_cache_lookup.php 77% from 13 tests

The main PHP script in "Debug Bar Cache Lookup" version 0.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("debug-bar-cache-lookup.php" instead of "debug_bar_cache_lookup.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin135 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3164759
XML191538
CSS12019
JavaScript10119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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