94% 404-to-301-redirect-by-felix

Code Review | 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira

WordPress plugin 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira scored 94% from 54 tests.

About plugin

  • Plugin page: 404-to-301-redire...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.6
  • WordPress version: 5.9.2
  • First release: Feb 11, 2020
  • Latest release: Jan 4, 2021
  • Number of updates: 23
  • Update frequency: every 16.8 days
  • Top authors: devfelixmoira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,721 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼294.44ms] Passed 4 tests

Analyzing server-side resources used by 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0549.20 ▼0.29
Dashboard /wp-admin3.41 ▲0.0031.92 ▼0.42
Posts /wp-admin/edit.php3.64 ▲0.0034.95 ▼15.17
Add New Post /wp-admin/post-new.php6.89 ▼0.0896.79 ▼1,155.21
Media Library /wp-admin/upload.php3.30 ▼0.0123.74 ▼6.94

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,271 ▼45115.84 ▲0.204.21 ▼1.800.07 ▼2.26
Dashboard /wp-admin2,889 ▲286.18 ▲0.02117.17 ▼14.75154.20 ▼4.77
Posts /wp-admin/edit.php2,688 ▼03.24 ▲0.0162.40 ▼0.28135.55 ▼8.16
Add New Post /wp-admin/post-new.php1,661 ▼11216.25 ▼4.75445.99 ▲2.53159.07 ▲3.57
Media Library /wp-admin/upload.php1,698 ▲35.49 ▼0.03143.95 ▲1.93190.18 ▲1.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/404-to-301-redirect-by-felix/yrd-404-to-301.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: 301, 404-to-301, 404

404-to-301-redirect-by-felix/yrd-404-to-301.php 92% from 13 tests

The main file in "404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("404-to-301-redirect-by-felix.php" instead of "yrd-404-to-301.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13813

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
There were not PNG files found in your plugin