84% wp-redirect-to-similar-page

Code Review | WP Redirect to similar page

WordPress plugin WP Redirect to similar page scored84%from 54 tests.

About plugin

  • Plugin page: wp-redirect-to-si...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Feb 21, 2015
  • Latest release: Aug 3, 2016
  • Number of updates: 4
  • Update frequency: every 132.2 days
  • Top authors: LibraFire (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,294 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.50ms] Passed 4 tests

An overview of server-side resources used by WP Redirect to similar page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.29 ▼1.06
Dashboard /wp-admin3.31 ▲0.0044.62 ▼4.08
Posts /wp-admin/edit.php3.36 ▲0.0045.66 ▲0.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.53 ▼13.05
Media Library /wp-admin/upload.php3.23 ▲0.0035.66 ▲2.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Redirect to similar page: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.341.64 ▼0.2437.69 ▼5.31
Dashboard /wp-admin2,192 ▲215.61 ▼0.0589.70 ▼2.0538.91 ▼0.35
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0136.63 ▲0.5334.34 ▼0.81
Add New Post /wp-admin/post-new.php1,526 ▼223.17 ▲0.05683.14 ▲1.9363.21 ▲11.25
Media Library /wp-admin/upload.php1,400 ▲94.22 ▲0.05105.20 ▲8.4348.22 ▲2.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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/wp-redirect-to-similar-page/redirect-to-similar.php:73

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: no 404 page, redirect to similar page, 404 redirect

wp-redirect-to-similar-page/redirect-to-similar.php 85% from 13 tests

The entry point to "WP Redirect to similar page" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-redirect-to-similar-page.php" instead of "redirect-to-similar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111053

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions2
▷ Named functions2100.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
No PNG files were detected