94% debug-wp-redirect

Code Review | Debug wp_redirect()

WordPress plugin Debug wp_redirect() scored 94% from 54 tests.

About plugin

  • Plugin page: debug-wp-redirect
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7.2
  • WordPress version: 5.8.1
  • First release: Feb 28, 2013
  • Latest release: Jun 4, 2021
  • Number of updates: 7
  • Update frequency: every 431.1 days
  • Top authors: sc0ttkclark (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 4,766 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼143.91ms] Passed 4 tests

A check of server-side resources used by Debug wp_redirect()
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1934.61 ▲11.60
Dashboard /wp-admin3.14 ▲0.0944.25 ▼6.76
Posts /wp-admin/edit.php3.20 ▲0.0943.37 ▲3.54
Add New Post /wp-admin/post-new.php5.51 ▲0.0889.33 ▼564.19
Media Library /wp-admin/upload.php3.09 ▲0.0830.80 ▼8.24
Debug wp_redirect() /wp-admin/options-general.php?page=debug-wp-redirect3.0627.32

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Debug wp_redirect()
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.74 ▲0.197.78 ▼1.1253.02 ▲3.03
Dashboard /wp-admin2,978 ▲475.93 ▼0.02135.46 ▼7.87104.38 ▼5.56
Posts /wp-admin/edit.php2,741 ▲52.70 ▲0.0063.48 ▼6.4789.17 ▼10.18
Add New Post /wp-admin/post-new.php1,686 ▲1418.48 ▼0.36373.66 ▲7.12106.04 ▼7.79
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.03147.84 ▲10.41115.55 ▼4.81
Debug wp_redirect() /wp-admin/options-general.php?page=debug-wp-redirect1,0902.1856.1880.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/debug-wp-redirect/debug-wp-redirect.php:70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: wp_redirect, redirects, debug

debug-wp-redirect/debug-wp-redirect.php Passed 13 tests

Analyzing the main PHP file in "Debug wp_redirect()" version 2.0
75 characters long description:
Outputs information about each wp_redirect call done on the front of a site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin362 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2104161362

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin