90% videojs-html5-player

Code Review | Videojs HTML5 Player

WordPress plugin Videojs HTML5 Player scored90%from 54 tests.

About plugin

  • Plugin page: videojs-html5-player
  • Plugin version: 1.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Sep 11, 2023
  • Number of updates: 58
  • Update frequency: every 52.5 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /143,517 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.20ms] Passed 4 tests

This is a short check of server-side resources used by Videojs HTML5 Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.19 ▼3.13
Dashboard /wp-admin3.35 ▲0.0550.53 ▼5.15
Posts /wp-admin/edit.php3.40 ▲0.0545.02 ▼2.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.20 ▼9.88
Media Library /wp-admin/upload.php3.28 ▲0.0538.17 ▲2.12
Videojs HTML5 Player /wp-admin/options-general.php?page=videojs-html5-player-settings3.2433.97

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 108 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Videojs HTML5 Player
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17914.38 ▼0.0115.79 ▲13.3544.08 ▼2.35
Dashboard /wp-admin2,213 ▲255.88 ▲0.01103.11 ▼10.4739.73 ▼7.73
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0336.14 ▲0.8932.37 ▼3.79
Add New Post /wp-admin/post-new.php1,537 ▲1523.17 ▼0.05648.82 ▼22.3853.48 ▲0.53
Media Library /wp-admin/upload.php1,389 ▲14.20 ▲0.06103.42 ▼11.9443.30 ▼6.03
Videojs HTML5 Player /wp-admin/options-general.php?page=videojs-html5-player-settings8062.0227.4235.50

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: videojs, player, video, embed, html5

videojs-html5-player/videojs-html5-player.php 92% from 13 tests

"Videojs HTML5 Player" version 1.1.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected193,597 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5356,712116,373188,988
JSON39102,675
CSS422961,555
PHP22332265
SVG100114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
addons/images/videojs-disable-right-click.png3.80KB1.80KB▼ 52.63%