83% video-background-block

Code Review | Video Background Block - Use video as background in the section.

WordPress plugin Video Background Block - Use video as background in the section. scored 83% from 54 tests.

About plugin

  • Plugin page: video-background-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 22, 2022
  • Latest release: Sep 13, 2023
  • Number of updates: 15
  • Update frequency: every 33.9 days
  • Top authors: charlescormier (86.67%)abuhayat (20%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active / 3,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.10ms] Passed 4 tests

A check of server-side resources used by Video Background Block - Use video as background in the section.
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.61 ▼2.38
Dashboard /wp-admin3.34 ▲0.0445.66 ▼2.96
Posts /wp-admin/edit.php3.39 ▲0.0342.69 ▼0.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.06 ▼11.78
Media Library /wp-admin/upload.php3.26 ▲0.0334.85 ▼3.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Video Background Block - Use video as background in the section.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.481.77 ▼0.2146.26 ▲6.12
Dashboard /wp-admin2,206 ▲155.83 ▲0.9598.24 ▼2.6739.58 ▼5.61
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0136.04 ▲0.6530.66 ▼5.52
Add New Post /wp-admin/post-new.php6,419 ▲4,90020.58 ▼2.551,013.98 ▲299.9158.62 ▲6.73
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0595.53 ▼32.1545.73 ▼4.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
Good news, no errors were detected

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 server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant VBB_VERSION - assumed 'VBB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/video-background-block/dist/editor.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-background-block/inc/block.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Invalid version format
You can look at the official readme.txt

video-background-block/index.php 85% from 13 tests

"Video Background Block - Use video as background in the section." version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("video-background-block.php" instead of "index.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected236 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3271396
JSON20079
PO File1203358
CSS2022
JavaScript1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin