89% post-url-redirect

Code Review | Redirector

WordPress plugin Redirector scored89%from 54 tests.

About plugin

  • Plugin page: post-url-redirect
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2021
  • Latest release: Sep 16, 2023
  • Number of updates: 12
  • Update frequency: every 67.3 days
  • Top authors: haziqkhatri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /673 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.06MB] [CPU: ▼10.72ms] Passed 4 tests

An overview of server-side resources used by Redirector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.05 ▼7.30
Dashboard /wp-admin3.39 ▲0.0448.56 ▼22.03
Posts /wp-admin/edit.php3.44 ▲0.0849.36 ▼6.25
Add New Post /wp-admin/post-new.php6.00 ▲0.1093.99 ▼7.29
Media Library /wp-admin/upload.php3.32 ▲0.0837.94 ▲5.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redirector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.34 ▼0.021.64 ▼0.4237.29 ▼6.93
Dashboard /wp-admin2,212 ▲385.64 ▲0.0389.96 ▼11.5442.81 ▼3.80
Posts /wp-admin/edit.php2,123 ▲201.98 ▲0.0237.95 ▼2.2041.59 ▲6.67
Add New Post /wp-admin/post-new.php1,390 ▼13820.58 ▼2.48541.33 ▼101.0234.53 ▼23.73
Media Library /wp-admin/upload.php1,414 ▲174.14 ▼0.0499.36 ▼1.8546.25 ▲2.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however 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
The SRP test was a success

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Screenshots: Add images for these screenshots: #1 (Meta box - No redirection), #8 (Meta box - SSL)
Please take inspiration from this readme.txt

post-url-redirect/redirector.php 92% from 13 tests

This is the main PHP file of "Redirector" version 1.0.2, 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 ("post-url-redirect.php" instead of "redirector.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
Good job! No executable or dangerous file extensions detected650 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3245183366
PO File34692149
JavaScript15712111
CSS16724

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.00
▷ Minimum class complexity14.00
▷ Maximum class complexity46.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods318.75%
▷ 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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected