94% background-videos-for-visual-composer

Code Review | Background Videos for Visual Composer

WordPress plugin Background Videos for Visual Composer scored 94% from 53 tests.

About plugin

  • Plugin page: background-videos...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.3
  • WordPress version: 5.8.1
  • First release: Oct 10, 2015
  • Latest release: Feb 10, 2016
  • Number of updates: 17
  • Update frequency: every 31.3 days
  • Top authors: GusRuss89 (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

500+ active / 13,959 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼267.07ms] Passed 4 tests

Server-side resources used by Background Videos for Visual Composer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1834.33 ▲5.20
Dashboard /wp-admin3.12 ▲0.0739.57 ▼6.50
Posts /wp-admin/edit.php3.17 ▲0.0644.24 ▲9.13
Add New Post /wp-admin/post-new.php5.48 ▲0.0590.41 ▼1,055.00
Media Library /wp-admin/upload.php3.06 ▲0.0531.32 ▼11.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Background Videos for Visual Composer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲6715.90 ▲0.2610.53 ▲2.3946.51 ▲0.10
Dashboard /wp-admin2,927 ▲775.93 ▲0.09138.96 ▲0.31109.70 ▲6.00
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0165.37 ▲0.0186.22 ▼6.42
Add New Post /wp-admin/post-new.php1,853 ▲37418.96 ▲2.14368.75 ▲0.07103.80 ▼7.27
Media Library /wp-admin/upload.php1,775 ▲35.00 ▼0.03140.46 ▼20.71103.54 ▼17.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/background-videos-for-visual-composer/background-videos-for-vc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Plugin options for a Visual Composer row.), #2 (Plugin options (scrolled down).)
You can look at the official readme.txt

background-videos-for-visual-composer/background-videos-for-vc.php 92% from 13 tests

Analyzing the main PHP file in "Background Videos for Visual Composer" version 1.0.6
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("background-videos-for-visual-composer.php" instead of "background-videos-for-vc.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin658 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25471377
JavaScript27587196
CSS223485

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ 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 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.43MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png89.67KB30.65KB▼ 65.82%
assets/patterns/black-broken-diagonal-lines.png0.21KB0.22KB0.00%
assets/patterns/white-plus-signs.png0.13KB0.10KB▼ 20.61%
assets/patterns/black-plus-signs.png0.12KB0.10KB▼ 16.13%
assets/patterns/white-small-checks.png0.11KB0.10KB▼ 14.53%