68% all-404-redirect-to-homepage

Code Review | All 404 Redirect to Homepage

WordPress plugin All 404 Redirect to Homepage scored68%from 54 tests.

About plugin

  • Plugin page: all-404-redirect-...
  • Plugin version: 4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Jul 17, 2023
  • Number of updates: 101
  • Update frequency: every 33.7 days
  • Top authors: fakhris (81.19%)osamaesh (16.83%)wp-buy (3.96%)

Code review

54 tests

User reviews

88 reviews

Install metrics

200,000+ active /4,001,773 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.35ms] Passed 4 tests

A check of server-side resources used by All 404 Redirect to Homepage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.57 ▲1.27
Dashboard /wp-admin3.37 ▲0.0646.87 ▼5.94
Posts /wp-admin/edit.php3.48 ▲0.1347.65 ▲0.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.57 ▼16.94
Media Library /wp-admin/upload.php3.29 ▲0.0638.93 ▲9.14

Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • You have illegally modified 1 file (0.86KB) outside of "wp-content/plugins/all-404-redirect-to-homepage/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
options-404-redirect-group
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by All 404 Redirect to Homepage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.151.53 ▼0.0542.11 ▼2.79
Dashboard /wp-admin2,212 ▲245.81 ▲0.9095.72 ▼9.7639.26 ▼3.04
Posts /wp-admin/edit.php2,098 ▲62.17 ▲0.1543.47 ▲4.0238.25 ▲1.79
Add New Post /wp-admin/post-new.php1,542 ▲2318.59 ▼4.37618.68 ▼43.8452.31 ▲0.45
Media Library /wp-admin/upload.php1,394 ▲64.17 ▼0.0894.36 ▼11.7642.12 ▼2.26
All 404 Redirect to Homepage /wp-admin/all-404-redirect-to-homepage.php260.440.0913.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/all-404-redirect-to-homepage/uninstall.php+13
    Array to string conversion
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • options-404-redirect-group
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/all-404-redirect-to-homepage/all-404-redirect-to-homepage.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/all-404-redirect-to-homepage.php
    • > Network (severe)
    wp-admin/all-404-redirect-to-homepage.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (Plugin Options.), #2 (Latest 404 links Redirected.)
The official readme.txt might help

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

"All 404 Redirect to Homepage" version 4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
62 characters long description:
a plugin to redirect 404 pages to home page or any custom page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin810 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP515541687
CSS117195
JavaScript18328

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
8 PNG files occupy 0.24MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/error.png1.44KB1.43KB0.27%
images/dialog-warning.png1.27KB1.43KB0.00%
screenshot-1.png89.95KB28.76KB▼ 68.03%
images/seo-redirect.png8.17KB3.81KB▼ 53.32%
screenshot-2.png116.32KB36.71KB▼ 68.44%