79% advanced-301-and-302-redirect

Code Review | Advanced 301 and 302 Redirect

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

About plugin

  • Plugin page: advanced-301-and-...
  • Plugin version: 1.6.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 18, 2019
  • Latest release: Aug 21, 2023
  • Number of updates: 64
  • Update frequency: every 23.8 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /11,032 total downloads

Benchmarks

Plugin footprint 65% from 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: ▼0.72ms] Passed 4 tests

An overview of server-side resources used by Advanced 301 and 302 Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0243.15 ▼6.22
Dashboard /wp-admin3.60 ▲0.0349.57 ▼5.21
Posts /wp-admin/edit.php3.71 ▲0.0354.00 ▲2.42
Add New Post /wp-admin/post-new.php6.18 ▲0.0399.29 ▲6.14
Media Library /wp-admin/upload.php3.52 ▲0.0344.53 ▲7.70
301/302 Redirection /wp-admin/options-general.php?page=yydev-redirection3.5235.76

Server storage [IO: ▲0.09MB] [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: 13 new files
Database: 2 new tables, 8 new options
New tables
wp_yydev_redirect
wp_yydev_redirects
New WordPress options
yydev_redirect_timestamp
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
yydev_advanced_301_redirect_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced 301 and 302 Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.39 ▲0.081.72 ▼0.0640.38 ▼3.98
Dashboard /wp-admin2,196 ▲195.61 ▼0.0992.31 ▲0.0144.03 ▼0.55
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0341.39 ▲4.5936.46 ▲0.81
Add New Post /wp-admin/post-new.php1,549 ▲2323.24 ▲5.55596.28 ▼114.3950.05 ▼7.54
Media Library /wp-admin/upload.php1,398 ▲14.25 ▲0.11104.71 ▼7.9945.87 ▲1.79
301/302 Redirection /wp-admin/options-general.php?page=yydev-redirection8592.0624.2435.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_yydev_redirect
    • wp_yydev_redirects
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • yydev_redirect_timestamp
    • widget_recent-comments
    • yydev_advanced_301_redirect_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

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

The main PHP script in "Advanced 301 and 302 Redirect" version 1.6.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same 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 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,138 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP105342641,138

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png5.25KB5.45KB0.00%
images/delete.png0.62KB0.64KB0.00%