93% 404-redirector

Code Review | 404 ReDirector

WordPress plugin 404 ReDirector scored 93% 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: 5.9.2
  • 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

100+ active / 3,052 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by 404 ReDirector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0555.76 ▲2.60
Dashboard /wp-admin3.43 ▲0.0233.97 ▼0.11
Posts /wp-admin/edit.php3.66 ▲0.0237.31 ▼1.12
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.22 ▼1,181.13
Media Library /wp-admin/upload.php3.31 ▲0.0225.44 ▲0.54

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 404 ReDirector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.95 ▲0.175.60 ▼0.432.49 ▼0.34
Dashboard /wp-admin2,895 ▲376.10 ▼0.06115.29 ▼16.55157.56 ▼1.06
Posts /wp-admin/edit.php2,694 ▼03.25 ▲0.0261.53 ▼2.25131.86 ▼10.98
Add New Post /wp-admin/post-new.php1,752 ▲4121.69 ▲0.14463.64 ▲15.31156.14 ▲0.56
Media Library /wp-admin/upload.php1,698 ▼05.50 ▼0.01143.51 ▲2.71189.46 ▲0.32

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
Uninstaller ran successfully

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > 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 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "404 ReDirector" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: A good plugin description is longer than 10 characters (currently 0 characters long)

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
Success! There were no dangerous files found in this plugin133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15892133

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin