80% ws-redirect-wp

Code Review | WS Redirect WP

WordPress plugin WS Redirect WP scored80%from 54 tests.

About plugin

  • Plugin page: ws-redirect-wp
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.0
  • WordPress version: 6.3.1
  • First release: Jun 11, 2017
  • Latest release: Jun 8, 2022
  • Number of updates: 13
  • Update frequency: every 140.2 days
  • Top authors: silvermuru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,114 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼7.59ms] Passed 4 tests

A check of server-side resources used by WS Redirect WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.10 ▼2.34
Dashboard /wp-admin3.33 ▲0.0346.35 ▼5.50
Posts /wp-admin/edit.php3.38 ▲0.0343.15 ▼6.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.54 ▼16.47
Media Library /wp-admin/upload.php3.26 ▲0.0334.68 ▲2.65
WS Redirect WP /wp-admin/options-general.php?page=ws-redirect-wp-settings3.2232.71

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
wsredirect-wp-active-option
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WS Redirect WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.021.75 ▲0.0144.01 ▼0.97
Dashboard /wp-admin2,196 ▲165.51 ▼0.1886.11 ▼14.7737.40 ▼7.35
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0034.45 ▼6.3134.78 ▼2.39
Add New Post /wp-admin/post-new.php1,529 ▲323.00 ▼0.22678.18 ▲9.3556.33 ▲2.86
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.07105.19 ▼5.7246.68 ▼1.37
WS Redirect WP /wp-admin/options-general.php?page=ws-redirect-wp-settings8342.0328.2228.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WS_Redirect_WP::ws_redirect_wp_plugin_deactivated() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • 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
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

ws-redirect-wp/ws-redirect-wp.php Passed 13 tests

The entry point to "WS Redirect WP" version 1.0.7 is a PHP file that has certain tags in its header comment area
45 characters long description:
Redirecting web page visitor to external page

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
There were no executable files found in this plugin134 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4191099
PO File1101233
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin