83% 404-redirector

Code Review | 404 ReDirector

WordPress plugin 404 ReDirector scored83%from 54 tests.

About plugin

  • Plugin page: 404-redirector
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Oct 1, 2015
  • Number of updates: 14
  • Update frequency: every 106.0 days
  • Top authors: brainfruit (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /3,408 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.00MB] [CPU: ▼2.52ms] Passed 4 tests

An overview of server-side resources used by 404 ReDirector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.11 ▲2.28
Dashboard /wp-admin3.31 ▲0.0048.61 ▲0.69
Posts /wp-admin/edit.php3.36 ▲0.0044.73 ▲0.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.93 ▼12.28
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▲1.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for 404 ReDirector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.191.84 ▼0.0346.05 ▲2.36
Dashboard /wp-admin2,206 ▲184.87 ▼0.01107.60 ▼0.8940.83 ▼5.51
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0138.85 ▲2.5033.89 ▼3.86
Add New Post /wp-admin/post-new.php1,536 ▲823.03 ▲4.70677.12 ▲39.9654.59 ▼5.72
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.0798.09 ▲0.2742.10 ▼4.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× 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/404-redirector/404-redirector.php:282

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)
There were no browser issues found

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

404-redirector/404-redirector.php 85% from 13 tests

The main file in "404 ReDirector" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please use more than 10 characters for the plugin description (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15892133

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin