90% redirect-url-to-post

Code Review | Random Post Plugin - Redirect URL to Post

WordPress plugin Random Post Plugin - Redirect URL to Post scored90%from 54 tests.

About plugin

  • Plugin page: redirect-url-to-post
  • Plugin version: 0.23.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Sep 3, 2023
  • Number of updates: 123
  • Update frequency: every 24.6 days
  • Top authors: camthor (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

6,000+ active /62,324 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼9.77ms] Passed 4 tests

An overview of server-side resources used by Random Post Plugin - Redirect URL to Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1736.04 ▼7.10
Dashboard /wp-admin3.48 ▲0.1345.07 ▼12.18
Posts /wp-admin/edit.php3.59 ▲0.2345.26 ▲3.02
Add New Post /wp-admin/post-new.php6.06 ▲0.1789.55 ▼20.79
Media Library /wp-admin/upload.php3.40 ▲0.1733.00 ▲0.99

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
redirect-url-to-post-onboarding

Browser metrics Passed 4 tests

This is an overview of browser requirements for Random Post Plugin - Redirect URL to Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲6914.73 ▲0.381.64 ▼0.4041.36 ▼1.73
Dashboard /wp-admin2,198 ▲185.64 ▲0.0789.37 ▲6.0341.87 ▲4.18
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0438.30 ▼0.5934.96 ▼1.33
Add New Post /wp-admin/post-new.php1,536 ▲1022.94 ▼0.23604.84 ▼2.9259.07 ▲7.84
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.1197.20 ▼1.9745.36 ▲1.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
5 plugin tags: random, recent, filter, redirect, random post

redirect-url-to-post/redirect-url-to-post.php Passed 13 tests

The main PHP file in "Random Post Plugin - Redirect URL to Post" ver. 0.23.0 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Redirects to a post based on parameters in the URL

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin848 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2683479848

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity153.00
▷ Minimum class complexity153.00
▷ Maximum class complexity153.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods724.14%
▷ Protected methods00.00%
▷ Private methods2275.86%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin