10% wp-video-html5-video-player

Code Review | HTML5 Video Player for Wordpress

WordPress plugin HTML5 Video Player for Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: wp-video-html5-vi...
  • Plugin version: 4.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.9
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Feb 11, 2017
  • Number of updates: 22
  • Update frequency: every 7.9 days
  • Top authors: onigetoc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /14,329 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-video-html5-video-player/video-js.php+231
    array_key_exists() expects parameter 2 to be array, bool given

Server metrics [RAM: ▼0.08MB] [CPU: ▼17.22ms] Passed 4 tests

Analyzing server-side resources used by HTML5 Video Player for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.75 ▼0.29
Dashboard /wp-admin3.28 ▼0.0235.20 ▼17.22
Posts /wp-admin/edit.php3.34 ▼0.0137.97 ▼16.49
Add New Post /wp-admin/post-new.php5.53 ▼0.3674.27 ▼31.86
Media Library /wp-admin/upload.php3.28 ▲0.0632.07 ▼3.30
Video.js Settings /wp-admin/options-general.php?page=videojs-settings3.2632.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
videojs_options
can_compress_scripts
videojs_db_version
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML5 Video Player for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9514.81 ▲0.222.53 ▲0.7243.70 ▲1.74
Dashboard /wp-admin2,228 ▲284.83 ▼1.06114.52 ▲9.7343.52 ▼4.59
Posts /wp-admin/edit.php2,104 ▲71.99 ▼0.0037.66 ▲1.9933.95 ▼0.50
Add New Post /wp-admin/post-new.php1,367 ▼18717.10 ▼1.35574.41 ▼61.7247.69 ▼4.12
Media Library /wp-admin/upload.php1,401 ▲74.25 ▲0.0599.19 ▼11.1541.55 ▼8.14
Video.js Settings /wp-admin/options-general.php?page=videojs-settings1,5112.6053.7835.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • videojs_options
    • videojs_db_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=videojs-settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-video-html5-video-player/video-js.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-video-html5-video-player/admin.php:7

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Settings and options), #2 (Video Pro - Skin Builder)
You can look at the official readme.txt

wp-video-html5-video-player/video-js.php 85% from 13 tests

The primary PHP file in "HTML5 Video Player for Wordpress" version 4.5.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-video-html5-video-player.php" instead of "video-js.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 289 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin939 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP311942442
JavaScript42221165
HTML3683107
SVG100102
Markdown166097
CSS21126

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.91MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
video-js.png0.69KB0.70KB0.00%
screenshot-2.png656.19KB186.87KB▼ 71.52%
screenshot-1.png275.47KB83.25KB▼ 69.78%