84% redirect-404-error-page-to-homepage-or-custom-page

Code Review | Redirect 404 Error Page to Homepage or Custom Page with Logs

WordPress plugin Redirect 404 Error Page to Homepage or Custom Page with Logs scored84%from 54 tests.

About plugin

  • Plugin page: redirect-404-erro...
  • Plugin version: 1.8.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: May 31, 2016
  • Latest release: Nov 18, 2023
  • Number of updates: 55
  • Update frequency: every 49.7 days
  • Top authors: fullworks (63.64%)WebFactory (21.82%)wpvibes (14.55%)bhupi18 (5.45%)

Code review

54 tests

User reviews

44 reviews

Install metrics

20,000+ active /221,411 total downloads

Benchmarks

Plugin footprint 83% 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.19MB] [CPU: ▼0.58ms] Passed 4 tests

Server-side resources used by Redirect 404 Error Page to Homepage or Custom Page with Logs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.71 ▲1.47
Dashboard /wp-admin3.51 ▲0.1755.92 ▼5.60
Posts /wp-admin/edit.php3.63 ▲0.2746.80 ▲0.98
Add New Post /wp-admin/post-new.php6.09 ▲0.2183.83 ▲0.84
Media Library /wp-admin/upload.php3.44 ▲0.2135.14 ▲3.79
404 Log /wp-admin/admin.php?page=redirect-404-error-page-to-homepage-or-custom-page-404-log-report3.4534.05
Settings /wp-admin/admin.php?page=redirect-404-error-page-to-homepage-or-custom-page3.4351.73

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_redirect_404_hp_cp_log
New WordPress options
redirect-404-error-page-to-homepage-or-custom-page-log
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
redirect-404-error-page-to-homepage-or-custom-page_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redirect 404 Error Page to Homepage or Custom Page with Logs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7614.58 ▲0.242.00 ▲0.3943.59 ▲1.12
Dashboard /wp-admin2,221 ▲405.59 ▼0.0793.83 ▼8.0341.96 ▼9.38
Posts /wp-admin/edit.php2,123 ▲231.97 ▲0.0238.99 ▲0.8633.20 ▼0.79
Add New Post /wp-admin/post-new.php1,545 ▲1923.16 ▼0.01648.50 ▲12.6551.56 ▼0.18
Media Library /wp-admin/upload.php1,426 ▲264.32 ▲0.09100.07 ▲2.5843.81 ▲1.20
404 Log /wp-admin/admin.php?page=redirect-404-error-page-to-homepage-or-custom-page-404-log-report1,0471.6924.8828.06
Settings /wp-admin/admin.php?page=redirect-404-error-page-to-homepage-or-custom-page1,2162.2045.3231.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 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)
Everything seems fine, however 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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Redirect_404_Error_Page_To_Homepage_Or_Custom_Page\\Admin\\Admin_Pages' not found in wp-content/plugins/redirect-404-error-page-to-homepage-or-custom-page/admin/class-admin-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Redirect_404_Error_Page_To_Homepage_Or_Custom_Page\\Admin\\Admin_Tables' not found in wp-content/plugins/redirect-404-error-page-to-homepage-or-custom-page/admin/class-admin-table-404-log.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/redirect-404-error-page-to-homepage-or-custom-page/admin/class-list-table-404-log.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

redirect-404-error-page-to-homepage-or-custom-page/redirect-404-error-page-to-homepage-or-custom-page.php 92% from 13 tests

"Redirect 404 Error Page to Homepage or Custom Page with Logs" version 1.8.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "6.0")

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
No dangerous file extensions were detected1,575 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP163694671,035
PO File3181193540

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 code0.22
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods73
▷ Static methods912.33%
▷ Public methods6386.30%
▷ Protected methods00.00%
▷ Private methods1013.70%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin