89% wp-404-auto-redirect-to-similar-post

Code Review | WP 404 Auto Redirect to Similar Post

WordPress plugin WP 404 Auto Redirect to Similar Post scored89%from 54 tests.

About plugin

  • Plugin page: wp-404-auto-redir...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 28, 2017
  • Latest release: Jun 12, 2020
  • Number of updates: 47
  • Update frequency: every 24.3 days
  • Top authors: hwk-fr (100%)

Code review

54 tests

User reviews

103 reviews

Install metrics

50,000+ active /241,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼9.70ms] Passed 4 tests

An overview of server-side resources used by WP 404 Auto Redirect to Similar Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2738.90 ▼8.22
Dashboard /wp-admin3.57 ▲0.2345.54 ▼17.21
Posts /wp-admin/edit.php3.69 ▲0.3351.01 ▲4.03
Add New Post /wp-admin/post-new.php6.15 ▲0.2792.50 ▼17.38
Media Library /wp-admin/upload.php3.50 ▲0.2744.70 ▲11.40
WP 404 Auto Redirect /wp-admin/options-general.php?page=wp-404-auto-redirect3.4733.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP 404 Auto Redirect to Similar Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.16 ▼1.132.02 ▲0.0741.69 ▼1.70
Dashboard /wp-admin2,210 ▲225.90 ▲0.99108.83 ▼3.0242.94 ▲2.67
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0040.94 ▲2.5736.08 ▲5.17
Add New Post /wp-admin/post-new.php1,539 ▲2023.21 ▼0.07666.01 ▲0.0457.59 ▲0.04
Media Library /wp-admin/upload.php1,392 ▲74.40 ▲0.2096.65 ▼3.6344.40 ▲0.20
WP 404 Auto Redirect /wp-admin/options-general.php?page=wp-404-auto-redirect1,6011.9229.1433.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: similar, seo, 404, redirect, webmaster tools...

wp-404-auto-redirect-to-similar-post/wp-404-auto-redirect-similar-post.php 85% from 13 tests

This is the main PHP file of "WP 404 Auto Redirect to Similar Post" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-404-auto-redirect-to-similar-post.php" instead of "wp-404-auto-redirect-similar-post.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,653 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP106762351,508
CSS115077
JavaScript117068

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity29.50
▷ Minimum class complexity3.00
▷ Maximum class complexity60.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png4.30KB1.62KB▼ 62.36%