74% wp-seo-redirect-301

Code Review | WP SEO Redirect 301

WordPress plugin WP SEO Redirect 301 scored74%from 54 tests.

About plugin

  • Plugin page: wp-seo-redirect-301
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2012
  • Latest release: Oct 11, 2021
  • Number of updates: 77
  • Update frequency: every 42.7 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /46,932 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.68MB] [CPU: ▼19.07ms] Passed 4 tests

A check of server-side resources used by WP SEO Redirect 301
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.99 ▲5.25
Dashboard /wp-admin3.39 ▲0.0571.85 ▲9.50
Posts /wp-admin/edit.php3.37 ▲0.0148.73 ▼7.61
Add New Post /wp-admin/post-new.php3.10 ▼2.7938.42 ▼71.53
Media Library /wp-admin/upload.php3.24 ▲0.0134.39 ▼2.40

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • There were 1 file (0.28KB) illegally modified outside of "wp-content/plugins/wp-seo-redirect-301/" and "wp-content/uploads/"
    • (new file) 301-sitemap.xml
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables
wp_slug_history
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP SEO Redirect 301
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.33 ▼0.022.01 ▲0.4343.07 ▲0.89
Dashboard /wp-admin2,213 ▲365.57 ▼0.1184.94 ▼11.3039.69 ▼6.53
Posts /wp-admin/edit.php2,118 ▲152.01 ▲0.0334.32 ▼7.9832.73 ▼4.69
Add New Post /wp-admin/post-new.php1,549 ▲2118.25 ▼4.82608.48 ▼63.6074.40 ▲2.78
Media Library /wp-admin/upload.php1,418 ▲214.18 ▼0.0397.49 ▼4.7843.28 ▼1.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_slug_history
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SEORedirect301s\\register_activation_hook() in wp-content/plugins/wp-seo-redirect-301/seo_redirect_301s.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: 301, seo, slug, redirect

wp-seo-redirect-301/seo_redirect_301s.php 92% from 13 tests

The entry point to "WP SEO Redirect 301" version 2.3.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-seo-redirect-301.php" instead of "seo_redirect_301s.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
Everything looks great! No dangerous files found in this plugin423 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36757399
CSS10014
Markdown18010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/edit.png1.69KB0.59KB▼ 65.22%
images/trash.png1.52KB0.70KB▼ 53.85%
images/rate-me.png2.62KB1.53KB▼ 41.67%