74% html5-video-background

Code Review | HTML5 Video Background

WordPress plugin HTML5 Video Background scored74%from 54 tests.

About plugin

  • Plugin page: html5-video-backg...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2015
  • Latest release: Mar 25, 2015
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: anoobis (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /12,914 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.89MB] [CPU: ▼32.81ms] Passed 4 tests

Analyzing server-side resources used by HTML5 Video Background
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0224.49 ▼18.94
Dashboard /wp-admin3.05 ▼0.2522.26 ▼25.94
Posts /wp-admin/edit.php3.06 ▼0.3023.27 ▼19.84
Add New Post /wp-admin/post-new.php3.05 ▼2.8424.71 ▼66.50
Media Library /wp-admin/upload.php3.05 ▼0.1823.39 ▼11.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML5 Video Background
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8714.47 ▲0.102.07 ▲0.1038.61 ▼7.91
Dashboard /wp-admin2,222 ▲304.84 ▼0.07108.08 ▲0.2243.03 ▲0.20
Posts /wp-admin/edit.php2,105 ▲161.97 ▼0.0339.81 ▲2.7733.81 ▼0.67
Add New Post /wp-admin/post-new.php6,285 ▲4,76626.05 ▲2.90846.97 ▲177.8659.73 ▲2.76
Media Library /wp-admin/upload.php1,404 ▲134.21 ▼0.0495.83 ▼10.4042.19 ▼0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method VIDBG::register_admin_menu() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-video-background/html5-video-background.php:280

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === html5-video-background === )
You can look at the official readme.txt

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

Analyzing the main PHP file in "HTML5 Video Background" version 1.0
92 characters long description:
Creates a fullscreen video background using html5 video. Falls back to an image with a link.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin468 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP15823202
CSS63441184
JavaScript17063
SVG10015
Markdown1204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin