84% redirect-when-video-ends

Code Review | Redirect when Video Ends

WordPress plugin Redirect when Video Ends scored84%from 54 tests.

About plugin

  • Plugin page: redirect-when-vid...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Dec 23, 2016
  • Latest release: Feb 19, 2017
  • Number of updates: 10
  • Update frequency: every 20.2 days
  • Top authors: ethanluismcdonough (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,336 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.91ms] Passed 4 tests

A check of server-side resources used by Redirect when Video Ends
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.81 ▼7.41
Dashboard /wp-admin3.31 ▲0.0147.55 ▼1.50
Posts /wp-admin/edit.php3.36 ▲0.0146.48 ▲1.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.21 ▼20.62
Media Library /wp-admin/upload.php3.24 ▲0.0139.00 ▲3.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Redirect when Video Ends
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.071.68 ▼0.3642.21 ▼3.42
Dashboard /wp-admin2,203 ▲155.83 ▼0.08104.15 ▼11.5338.19 ▼8.83
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0141.13 ▲5.7334.68 ▲0.08
Add New Post /wp-admin/post-new.php1,528 ▼023.30 ▲0.05674.28 ▲22.8160.18 ▲3.80
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.04111.10 ▲1.3947.69 ▲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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 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 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/redirect-when-video-ends/redirect-when-video-ends.php:43

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

redirect-when-video-ends/redirect-when-video-ends.php Passed 13 tests

This is the main PHP file of "Redirect when Video Ends" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
A shortcode that allows you to embed an HTML5 video and redirect the page when the video is over

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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
There are no PNG files in this plugin