100% 404-to-homepage

Code Review | Redirect 404 to Homepage

WordPress plugin Redirect 404 to Homepage scored 100% from 54 tests.

About plugin

  • Plugin page: 404-to-homepage
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Jun 13, 2019
  • Latest release: Jan 26, 2022
  • Number of updates: 20
  • Update frequency: every 48.0 days
  • Top authors: pipdig (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20,000+ active / 39,243 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.02MB] [CPU: ▼292.75ms] Passed 4 tests

Server-side resources used by Redirect 404 to Homepage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.62 ▲4.57
Dashboard /wp-admin3.41 ▲0.0131.23 ▼0.98
Posts /wp-admin/edit.php3.65 ▲0.0135.26 ▼1.89
Add New Post /wp-admin/post-new.php6.91 ▼0.0893.90 ▼1,166.97
Media Library /wp-admin/upload.php3.30 ▲0.0123.29 ▼1.16

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

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

Browser metrics Passed 4 tests

Redirect 404 to Homepage: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2916.01 ▼0.085.80 ▼0.402.15 ▼0.35
Dashboard /wp-admin2,888 ▲276.02 ▼0.14113.92 ▼18.89153.84 ▼7.82
Posts /wp-admin/edit.php2,657 ▼343.24 ▼0.0062.83 ▲1.43139.18 ▼3.61
Add New Post /wp-admin/post-new.php1,660 ▼816.15 ▼3.77406.54 ▲5.10150.70 ▼6.80
Media Library /wp-admin/upload.php1,698 ▲35.52 ▲0.04136.78 ▼1.14190.59 ▲4.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 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 Passed 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 SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
There were no plugin tags found

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

"Redirect 404 to Homepage" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
43 characters long description:
Redirect 404 missing pages to the homepage.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2698

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.57
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 functions00.00%
▷ Anonymous functions1100.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
No PNG files were detected