78% debug-bar-rewrite-rules

Code Review | Debug Bar Rewrite Rules

WordPress plugin Debug Bar Rewrite Rules scored 78% from 54 tests.

About plugin

  • Plugin page: debug-bar-rewrite...
  • Plugin version: 0.6.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Mar 31, 2021
  • Number of updates: 27
  • Update frequency: every 111.2 days
  • Top authors: Butuzov (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 43,513 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.13ms] Passed 4 tests

This is a short check of server-side resources used by Debug Bar Rewrite Rules
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.67 ▲0.68
Dashboard /wp-admin3.37 ▲0.0743.93 ▼5.89
Posts /wp-admin/edit.php3.49 ▲0.1347.68 ▼0.78
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.17 ▼22.52
Media Library /wp-admin/upload.php3.30 ▲0.0737.96 ▲5.69
Rewrite Rules /wp-admin/tools.php?page=rewrite-rules3.3130.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
debug_bar_rewrite_rules_installed
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
debug_bar_rewrite_rules_filters_list

Browser metrics Passed 4 tests

This is an overview of browser requirements for Debug Bar Rewrite Rules
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.211.68 ▼0.0140.40 ▼7.26
Dashboard /wp-admin2,210 ▲194.82 ▼0.06106.31 ▼7.7639.58 ▼5.90
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0234.89 ▼5.1031.01 ▼5.67
Add New Post /wp-admin/post-new.php1,537 ▲423.19 ▲0.00661.39 ▲73.1664.24 ▲13.02
Media Library /wp-admin/upload.php1,395 ▲74.22 ▲0.01102.75 ▲6.5145.20 ▲2.24
Rewrite Rules /wp-admin/tools.php?page=rewrite-rules1,8161.8627.1052.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/debug-bar-rewrite-rules/validator.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/debug-bar-rewrite-rules/templates/info-rules.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/debug-bar-rewrite-rules/templates/info-filters.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/debug-bar-rewrite-rules/templates/info-stats.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Contributors: Contributors not specified
The official readme.txt might help

debug-bar-rewrite-rules/rewrite-rules.php 92% from 13 tests

The main PHP file in "Debug Bar Rewrite Rules" ver. 0.6.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("debug-bar-rewrite-rules.php" instead of "rewrite-rules.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,131 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7169291508
JavaScript29498278
CSS2420238
PO File1313382
Markdown16025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity25.50
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin