84% all-404-pages-redirect-to-homepage

Code Review | All 404 Pages Redirect to Homepage

WordPress plugin All 404 Pages Redirect to Homepage scored 84% from 54 tests.

About plugin

  • Plugin page: all-404-pages-red...
  • Plugin version: 1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2018
  • Latest release: Jul 4, 2023
  • Number of updates: 42
  • Update frequency: every 42.5 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20,000+ active / 119,052 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.03MB] [CPU: ▼4.15ms] Passed 4 tests

A check of server-side resources used by All 404 Pages Redirect to Homepage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.83 ▼4.93
Dashboard /wp-admin3.34 ▲0.0344.76 ▼1.61
Posts /wp-admin/edit.php3.39 ▲0.0346.94 ▲0.87
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.71 ▼8.60
Media Library /wp-admin/upload.php3.26 ▲0.0333.57 ▼1.44
All 404 Redirect to Homepage /wp-admin/options-general.php?page=all-404-redirect-option3.2832.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for All 404 Pages Redirect to Homepage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.68 ▼0.691.65 ▲0.0144.82 ▲1.02
Dashboard /wp-admin2,217 ▲255.86 ▲0.9696.45 ▼6.0438.17 ▼7.76
Posts /wp-admin/edit.php2,097 ▲112.07 ▲0.0740.71 ▲3.5736.98 ▲5.31
Add New Post /wp-admin/post-new.php1,530 ▲1618.29 ▲0.76592.85 ▼98.8954.73 ▼4.70
Media Library /wp-admin/upload.php1,396 ▲84.26 ▲0.11104.54 ▼3.9645.61 ▼1.21
All 404 Redirect to Homepage /wp-admin/options-general.php?page=all-404-redirect-option8692.0422.3827.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • status_404r
    • widget_theysaidso_widget
    • redirect_to_404r
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_status_404r() in wp-content/plugins/all-404-pages-redirect-to-homepage/options.php:15

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
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
The official readme.txt is a good inspiration

all-404-pages-redirect-to-homepage/all-404-pages-redirect-to-homepage.php Passed 13 tests

The primary PHP file in "All 404 Pages Redirect to Homepage" version 1.9 is used by WordPress to initiate all plugin functionality
66 characters long description:
a plugin to redirect all 404 pages to home page or any custom page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin665 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP411421348
CSS2440293
JavaScript251224

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin