84% html5-videos

Code Review | HTML5 Videos

WordPress plugin HTML5 Videos scored84%from 54 tests.

About plugin

  • Plugin page: html5-videos
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Sep 24, 2012
  • Latest release: Jan 4, 2013
  • Number of updates: 14
  • Update frequency: every 26.1 days
  • Top authors: powercat74 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /11,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.46ms] Passed 4 tests

Server-side resources used by HTML5 Videos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.02308.30 ▲269.69
Dashboard /wp-admin3.32 ▼0.0241.29 ▼18.70
Posts /wp-admin/edit.php3.37 ▲0.0246.41 ▼3.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0275.66 ▼17.52
Media Library /wp-admin/upload.php3.25 ▲0.0234.04 ▼2.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

HTML5 Videos: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.81 ▼0.808.87 ▲7.2835.89 ▼6.29
Dashboard /wp-admin2,209 ▲184.85 ▼0.06107.52 ▲3.6542.43 ▼0.96
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0439.49 ▼2.3535.99 ▼0.87
Add New Post /wp-admin/post-new.php1,521 ▼1223.44 ▲0.27648.93 ▼15.2858.41 ▲5.12
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0892.89 ▼20.6942.01 ▼6.26

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/html5-videos/html5-videos.php
    • > /wp-content/plugins/html5-videos/html5_window.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === html5-videos === )
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

html5-videos/html5-videos.php Passed 13 tests

The principal PHP file in "HTML5 Videos" v. 1.0.2 is loaded by WordPress automatically on each request
80 characters long description:
Adds a button to the WYSIWYG editor to embed HTML5 videos from the Media Library

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin347 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP27141168
JavaScript33219122
CSS24057

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/video-js.png8.04KB3.82KB▼ 52.47%
img/html5.png0.32KB0.33KB0.00%