84% video-on-checkout

Code Review | Video on Checkout

WordPress plugin Video on Checkout scored84%from 54 tests.

About plugin

  • Plugin page: video-on-checkout
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.3
  • WordPress version: 6.3.1
  • First release: May 22, 2016
  • Latest release: Dec 28, 2019
  • Number of updates: 6
  • Update frequency: every 219.3 days
  • Top authors: ivanweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,024 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.76ms] Passed 4 tests

An overview of server-side resources used by Video on Checkout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.18 ▼7.87
Dashboard /wp-admin3.34 ▲0.0351.17 ▼5.95
Posts /wp-admin/edit.php3.45 ▲0.0951.11 ▼0.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.38 ▲5.78
Media Library /wp-admin/upload.php3.26 ▲0.0338.62 ▲3.67

Server storage [IO: ▲0.02MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Video on Checkout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.28 ▼0.111.91 ▼0.0543.65 ▼2.36
Dashboard /wp-admin2,206 ▲355.59 ▼0.0486.86 ▼14.0039.12 ▼5.10
Posts /wp-admin/edit.php2,115 ▲152.07 ▲0.0537.51 ▲0.8535.85 ▼0.96
Add New Post /wp-admin/post-new.php1,559 ▲2723.28 ▲0.35592.95 ▼85.6850.37 ▼10.30
Media Library /wp-admin/upload.php1,411 ▲114.33 ▲0.06102.08 ▼9.8045.98 ▼1.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/video-on-checkout/video-on-checkout.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/video-on-checkout/templates/admin/links.tpl.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: thank you, video, youtube, woocommerce

video-on-checkout/video-on-checkout.php Passed 13 tests

This is the main PHP file of "Video on Checkout" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Say thank you to your customers using video

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
Everything looks great! No dangerous files found in this plugin745 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318647736
JavaScript1409

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.91
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes436.36%
▷ Concrete classes763.64%
▷ Final classes00.00%
Methods61
▷ Static methods00.00%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin