78% woocommerce-html5-video

Code Review | WooCommerce HTML5 Video

WordPress plugin WooCommerce HTML5 Video scored 78% from 54 tests.

About plugin

  • Plugin page: woocommerce-html5...
  • Plugin version: 1.7.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 8, 2013
  • Latest release: May 10, 2019
  • Number of updates: 61
  • Update frequency: every 35.0 days
  • Top authors: webilop (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

1,000+ active / 40,207 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WooCommerce HTML5 Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.01 ▼0.88
Dashboard /wp-admin3.31 ▲0.0043.81 ▼8.00
Posts /wp-admin/edit.php3.36 ▲0.0042.39 ▼8.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.58 ▼5.32
Media Library /wp-admin/upload.php3.23 ▲0.0033.77 ▼0.26
WooCommerce Html5 Video /wp-admin/options-general.php?page=html5-video-settings3.0024.05

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

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

Browser metrics Passed 4 tests

WooCommerce HTML5 Video: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.58 ▼0.2940.52 ▲0.61
Dashboard /wp-admin2,203 ▲155.94 ▲1.0492.37 ▼12.1639.13 ▼3.66
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0432.69 ▼3.4833.96 ▲0.89
Add New Post /wp-admin/post-new.php1,542 ▲2318.40 ▼4.92623.08 ▼39.2056.61 ▼13.08
Media Library /wp-admin/upload.php1,385 ▲34.21 ▲0.0591.33 ▼11.3040.07 ▼7.45
WooCommerce Html5 Video /wp-admin/options-general.php?page=html5-video-settings280.440.133.60

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woocommerce-html5-video/WooCommerceHTML5Video.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=html5-video-settings
    • > Network (severe)
    wp-admin/options-general.php?page=html5-video-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 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
8 plugin tags: html5 video, woocommerce video, product video, mp4, online store...

woocommerce-html5-video/WooCommerceHTML5Video.php 85% from 13 tests

The main PHP file in "WooCommerce HTML5 Video" ver. 1.7.10 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-html5-video.php" instead of "WooCommerceHTML5Video.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,864 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP5921431,080
JavaScript55731769
PO File4203258504
CSS42611387
JSON10063
HTML13250
SVG10011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity32.25
▷ Minimum class complexity9.00
▷ Maximum class complexity55.00
Average method complexity6.43
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods24100.00%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete_icon.png3.30KB0.54KB▼ 83.61%
images/icon_video.png0.20KB0.24KB0.00%
images/twitter.png2.94KB1.80KB▼ 38.81%
images/gplus.png3.21KB1.80KB▼ 43.88%
images/info.png3.38KB0.95KB▼ 72.07%