58% html5-video-player

Code Review | Html5 Video Player - mp4 player, Video Player for WordPress

WordPress plugin Html5 Video Player - mp4 player, Video Player for WordPress scored58%from 54 tests.

About plugin

  • Plugin page: html5-video-player
  • Plugin version: 2.5.17
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Nov 24, 2023
  • Number of updates: 225
  • Update frequency: every 13.0 days
  • Top authors: abuhayat (60.89%)shehabulislam (39.56%)

Code review

54 tests

User reviews

180 reviews

Install metrics

30,000+ active /415,238 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲5.80MB] [CPU: ▲46.85ms] 75% from 4 tests

An overview of server-side resources used by Html5 Video Player - mp4 player, Video Player for WordPress
It is recommended to improve the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.80MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.7980.41 ▲38.08
Dashboard /wp-admin9.14 ▲5.79107.63 ▲46.60
Posts /wp-admin/edit.php9.19 ▲5.8394.54 ▲47.69
Add New Post /wp-admin/post-new.php11.79 ▲5.90151.66 ▲55.02
Media Library /wp-admin/upload.php9.02 ▲5.79106.07 ▲71.14
Upgrade /wp-admin/admin.php?page=video-player-pricing-manual9.0282.15
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2477.30

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 459 new files
Database: 2 new tables, 14 new options
New tables
wp_h5vp_views
wp_h5vp_videos
New WordPress options
widget_recent-posts
h5vp_views_database_version
theysaidso_admin_options
h5vp_plugin_do_activation_redirect
db_upgraded
fs_active_plugins
h5vp_quick
can_compress_scripts
widget_recent-comments
fs_accounts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Html5 Video Player - mp4 player, Video Player for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲14614.32 ▼0.381.82 ▼0.0436.88 ▼6.47
Dashboard /wp-admin2,296 ▲1165.64 ▼0.01101.53 ▲2.72112.33 ▲65.59
Posts /wp-admin/edit.php2,220 ▲1202.86 ▲0.8546.69 ▲7.9656.48 ▲18.57
Add New Post /wp-admin/post-new.php6,304 ▲4,77825.86 ▲2.58948.43 ▲296.6053.23 ▲0.59
Media Library /wp-admin/upload.php1,513 ▲1135.17 ▲1.08120.42 ▲26.3498.06 ▲57.00
Upgrade /wp-admin/admin.php?page=video-player-pricing-manual1,7623.7076.17120.60
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1242.5430.3631.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/html5-video-player/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_h5vp_views
    • wp_h5vp_videos
  • This plugin does not fully uninstall, leaving 14 options in the database
    • widget_recent-comments
    • fs_accounts
    • h5vp_quick
    • h5vp_videos_database_version
    • fs_active_plugins
    • theysaidso_admin_options
    • can_compress_scripts
    • h5vp_plugin_do_activation_redirect
    • db_upgraded
    • h5vp_option
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-video-player/inc/elementor-custom-control/register-controls.php:75
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/html5-video-player/admin/global/free-plugin-list.php on line 2
    • > PHP Warning
      require_once(wp-content/plugins/html5-video-player/inc/Services/Helper/DefaultArgs.php): failed to open stream: No such file or directory in wp-content/plugins/html5-video-player/inc/Services/playlist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-video-player/elementor-widget.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/html5-video-player/inc/Base/licence-check.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/html5-video-player/inc/Services/Helper/DefaultArgs.php' (include_path='.:/usr/share/php') in wp-content/plugins/html5-video-player/inc/Services/playlist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function H5VP\\Database\\get_option() in wp-content/plugins/html5-video-player/inc/Database/Table.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/html5-video-player/inc/Rest/Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-video-player/inc/Base/duplicate-player.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function H5VP\\Model\\add_action() in wp-content/plugins/html5-video-player/inc/Model/AjaxCall.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=video-player-pricing-manual
    • > Security (severe) in unknown
    https://js.freemius.com/vendors/nojquery.ba-postmessage.min.js?v=180 11 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://wicked-wildebeest-npzlm.instawp.xyz') does not match the recipient window's origin ('').

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

html5-video-player/html5-video-player.php Passed 13 tests

Analyzing the main PHP file in "Html5 Video Player - mp4 player, Video Player for WordPress" version 2.5.17
87 characters long description:
You can easily integrate html5 Video player in your wordress website using this plugin.

Code Analysis 97% from 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
No dangerous file extensions were detected84,761 lines of code in 372 files:
LanguageFilesBlank linesComment linesLines of code
PHP27612,77020,25656,962
JavaScript241,3916497,299
PO File203,1983,5916,500
CSS264106326,268
Sass1697035,674
JSON84402,056
SVG2002

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity40.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces15
Interfaces1
Traits0
Classes168
▷ Abstract classes42.38%
▷ Concrete classes16497.62%
▷ Final classes21.22%
Methods1,878
▷ Static methods35018.64%
▷ Public methods1,46578.01%
▷ Protected methods251.33%
▷ Private methods38820.66%
Functions146
▷ Named functions14095.89%
▷ Anonymous functions64.11%
Constants155
▷ Global constants10265.81%
▷ Class constants5334.19%
▷ Public constants53100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.31MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/drive.png0.81KB0.95KB0.00%
admin/img/icn.png3.20KB0.81KB▼ 74.79%
admin/img/aws.png1.68KB0.92KB▼ 45.29%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/html5-video-player.png181.53KB10.95KB▼ 93.97%