84% video-backgrounds-for-siteorigin-page-builder

Code Review | Video Backgrounds for SiteOrigin Page Builder

WordPress plugin Video Backgrounds for SiteOrigin Page Builder scored84%from 54 tests.

About plugin

  • Plugin page: video-backgrounds...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.3
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Mar 25, 2017
  • Number of updates: 9
  • Update frequency: every 56.3 days
  • Top authors: GusRuss89 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

4,000+ active /66,159 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
This plugin's installer ran successfully

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

Server-side resources used by Video Backgrounds for SiteOrigin Page Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.86 ▲1.78
Dashboard /wp-admin3.31 ▲0.0149.15 ▼6.41
Posts /wp-admin/edit.php3.36 ▲0.0152.04 ▼2.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.28 ▼15.31
Media Library /wp-admin/upload.php3.24 ▲0.0139.57 ▲1.75

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Video Backgrounds for SiteOrigin Page Builder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.66 ▼0.996.11 ▲4.0238.08 ▼5.84
Dashboard /wp-admin2,215 ▲125.83 ▲0.02104.12 ▼2.0936.49 ▲0.15
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0536.44 ▼3.1135.39 ▼0.88
Add New Post /wp-admin/post-new.php1,540 ▲923.20 ▲0.12622.99 ▼29.7752.76 ▼1.03
Media Library /wp-admin/upload.php1,400 ▲34.32 ▲0.12107.91 ▼3.4752.59 ▲3.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/video-backgrounds-for-siteorigin-page-builder/background-videos-for-siteorigin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Plugin options for a SiteOrigin page builder row.), #2 (Plugin options (scrolled down).)
The official readme.txt is a good inspiration

video-backgrounds-for-siteorigin-page-builder/background-videos-for-siteorigin.php 92% from 13 tests

"Video Backgrounds for SiteOrigin Page Builder" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("video-backgrounds-for-siteorigin-page-builder.php" instead of "background-videos-for-siteorigin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin595 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16574327
JavaScript15046158
CSS2436110

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity30.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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
32 PNG files occupy 0.08MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/patterns/white-zig-zag.png0.13KB0.10KB▼ 25.55%
assets/patterns/black-squares.png0.13KB0.10KB▼ 20.93%
assets/patterns/black-criss-cross.png0.12KB0.10KB▼ 13.56%
assets/patterns/white-horizontal-stripes.png0.11KB0.10KB▼ 11.50%
assets/patterns/white-plus-signs.png0.13KB0.10KB▼ 20.61%