89% redirect-404-error-page-to-homepage

Code Review | Redirect 404 Error Page to Homepage

WordPress plugin Redirect 404 Error Page to Homepage scored 89% from 54 tests.

About plugin

  • Plugin page: redirect-404-erro...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 18, 2016
  • Latest release: Mar 27, 2021
  • Number of updates: 20
  • Update frequency: every 90.2 days
  • Top authors: prothoughts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active / 73,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Redirect 404 Error Page to Homepage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.95 ▼1.40
Dashboard /wp-admin3.31 ▲0.0047.32 ▼1.47
Posts /wp-admin/edit.php3.36 ▲0.0042.66 ▼1.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.88 ▼5.18
Media Library /wp-admin/upload.php3.23 ▲0.0029.91 ▼10.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Redirect 404 Error Page to Homepage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.83 ▲0.601.78 ▲0.1344.33 ▲3.18
Dashboard /wp-admin2,209 ▲215.86 ▲1.01104.23 ▼9.9143.42 ▼1.19
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0534.07 ▼14.5331.02 ▼2.81
Add New Post /wp-admin/post-new.php1,514 ▼017.47 ▼0.06667.12 ▼15.4971.32 ▲9.65
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0495.41 ▼14.8141.59 ▼4.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Enter invalid blog url like http:// < your blog > .com/abcde, it will be redirected to homepage.) image missing
The official readme.txt might help

redirect-404-error-page-to-homepage/redirect-404-error-page-to-homepage.php Passed 13 tests

The main PHP file in "Redirect 404 Error Page to Homepage" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
81 characters long description:
Simple redirect wordpress plugin, all 404 error pages are redirected to homepage.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin12 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP231212

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected