79% 404-to-301

Code Review | 404 to 301 - Redirect, Log and Notify 404 Errors

WordPress plugin 404 to 301 - Redirect, Log and Notify 404 Errors scored 79% from 54 tests.

About plugin

  • Plugin page: 404-to-301
  • Plugin version: 3.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 5.9.2
  • First release: Jul 24, 2014
  • Latest release: Feb 9, 2022
  • Number of updates: 145
  • Update frequency: every 19.0 days
  • Top authors: joelcj91 (100%)

Code review

54 tests

User reviews

254 reviews

Install metrics

100,000+ active / 1,500,499 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
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼306.42ms] Passed 4 tests

An overview of server-side resources used by 404 to 301 - Redirect, Log and Notify 404 Errors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1755.87 ▲8.72
Dashboard /wp-admin3.66 ▲0.2633.40 ▼1.26
Posts /wp-admin/edit.php3.87 ▲0.2338.01 ▲0.80
Add New Post /wp-admin/post-new.php7.51 ▲0.5485.39 ▼1,222.90
Media Library /wp-admin/upload.php3.61 ▲0.3124.27 ▼2.33
404 Settings /wp-admin/admin.php?page=jj4t3-settings3.5224.05
404 Errors /wp-admin/admin.php?page=jj4t3-logs3.4924.79

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: 1 new table, 3 new options
New tables
wp_404_to_301
New WordPress options
i4t3_db_version
i4t3_review_notice
i4t3_gnrl_options

Browser metrics Passed 4 tests

404 to 301 - Redirect, Log and Notify 404 Errors: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,028 ▲27415.85 ▲0.075.77 ▼0.673.15 ▲0.15
Dashboard /wp-admin3,122 ▲2686.04 ▼0.13117.54 ▼15.93156.82 ▼2.33
Posts /wp-admin/edit.php2,932 ▲2443.26 ▲0.0363.13 ▼0.42142.81 ▼0.79
Add New Post /wp-admin/post-new.php1,909 ▲24121.24 ▲3.17433.08 ▲39.88151.75 ▼5.38
Media Library /wp-admin/upload.php1,945 ▲2505.63 ▲0.06142.87 ▲3.84186.13 ▼3.68
404 Settings /wp-admin/admin.php?page=jj4t3-settings1,6002.5759.80140.83
404 Errors /wp-admin/admin.php?page=jj4t3-logs1,5862.7856.2599.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_404_to_301
  • The uninstall procedure has failed, leaving 3 options in the database
    • i4t3_db_version
    • i4t3_review_notice
    • i4t3_gnrl_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

404-to-301/404-to-301.php 92% from 13 tests

The main PHP file in "404 to 301 - Redirect, Log and Notify 404 Errors" ver. 3.1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,522 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP153961,9641,194
PO File1165330171
CSS121668
JavaScript2223853
Sass17029
XML1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods81
▷ Static methods89.88%
▷ Public methods4960.49%
▷ Protected methods22.47%
▷ Private methods3037.04%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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