79% advanced-301-and-302-redirect

Code Review | Advanced 301 and 302 Redirect

WordPress plugin Advanced 301 and 302 Redirect scored 79% from 54 tests.

About plugin

  • Plugin page: advanced-301-and-...
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jun 18, 2019
  • Latest release: Mar 26, 2022
  • Number of updates: 59
  • Update frequency: every 17.2 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active / 6,212 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼308.38ms] Passed 4 tests

A check of server-side resources used by Advanced 301 and 302 Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0170.00 ▲2.19
Dashboard /wp-admin3.43 ▲0.0241.02 ▼2.10
Posts /wp-admin/edit.php3.65 ▲0.0045.56 ▼2.14
Add New Post /wp-admin/post-new.php6.89 ▼0.08106.31 ▼1,224.48
Media Library /wp-admin/upload.php3.30 ▲0.0135.75 ▼4.81
301/302 Redirection /wp-admin/options-general.php?page=yydev-redirection3.3429.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: 2 new tables, 2 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced 301 and 302 Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲9016.11 ▲0.627.54 ▼3.642.79 ▼0.51
Dashboard /wp-admin2,959 ▲406.41 ▲0.03185.22 ▼26.00195.58 ▼34.63
Posts /wp-admin/edit.php2,724 ▲33.45 ▲0.0398.67 ▲10.94171.85 ▲2.02
Add New Post /wp-admin/post-new.php1,665 ▲417.88 ▲1.86622.13 ▼55.45195.72 ▼0.42
Media Library /wp-admin/upload.php1,732 ▲25.72 ▲0.01186.51 ▼3.03256.84 ▲11.00
301/302 Redirection /wp-admin/options-general.php?page=yydev-redirection1,1482.6377.29164.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_yydev_redirects
    • wp_yydev_redirect
  • The uninstall procedure has failed, leaving 2 options in the database
    • yydev_redirect_timestamp
    • yydev_advanced_301_redirect_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

advanced-301-and-302-redirect/index.php 92% from 13 tests

"Advanced 301 and 302 Redirect" version 1.6.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-301-and-302-redirect.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,135 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

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.43
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions18100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings