84% shortcode-http-redirect

Code Review | Shortcode Redirect

WordPress plugin Shortcode Redirect scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-http-re...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9
  • WordPress version: 6.3.1
  • First release: Oct 21, 2018
  • Latest release: Oct 21, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: genhoi25 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Shortcode Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.42 ▼6.21
Dashboard /wp-admin3.31 ▲0.0046.77 ▼8.20
Posts /wp-admin/edit.php3.36 ▲0.0043.12 ▼2.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.36 ▼10.34
Media Library /wp-admin/upload.php3.23 ▲0.0032.20 ▼4.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcode Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▼0.311.66 ▼0.1639.13 ▼8.59
Dashboard /wp-admin2,206 ▲215.88 ▲0.02113.97 ▲13.8541.14 ▼0.74
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0533.74 ▼4.2035.42 ▲1.12
Add New Post /wp-admin/post-new.php1,537 ▲423.26 ▲0.23648.77 ▼20.9448.48 ▼4.71
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.05101.38 ▼2.9743.07 ▲1.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcode-http-redirect/scr.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: shortcode, 301, redirect, post redirect, page redirect...

shortcode-http-redirect/scr.php 92% from 13 tests

This is the main PHP file of "Shortcode Redirect" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("shortcode-http-redirect.php" instead of "scr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151911

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin