84% wp-video-lightbox

Code Review | WP Video Lightbox

WordPress plugin WP Video Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: wp-video-lightbox
  • Plugin version: 1.9.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2012
  • Latest release: Aug 4, 2023
  • Number of updates: 103
  • Update frequency: every 39.4 days
  • Top authors: wptipsntricks (80.58%)mra13 (18.45%)wpecommerce (2.91%)

Code review

54 tests

User reviews

67 reviews

Install metrics

40,000+ active /1,186,800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼9.03ms] Passed 4 tests

An overview of server-side resources used by WP Video Lightbox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.61 ▼1.62
Dashboard /wp-admin3.48 ▲0.1841.58 ▼4.80
Posts /wp-admin/edit.php3.59 ▲0.2445.89 ▼3.45
Add New Post /wp-admin/post-new.php6.06 ▲0.1876.06 ▼26.26
Media Library /wp-admin/upload.php3.40 ▲0.1837.66 ▲1.85
Video Lightbox /wp-admin/options-general.php?page=wp_video_lightbox3.3728.12

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 77 new files
Database: no new tables, 10 new options
New WordPress options
wpvl_enable_prettyPhoto
wpvl_plugin_version
widget_theysaidso_widget
widget_recent-comments
wpvl_prettyphoto_options
can_compress_scripts
widget_recent-posts
wpvl_enable_jquery
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Video Lightbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲15013.79 ▼0.575.80 ▲4.2442.99 ▲4.32
Dashboard /wp-admin2,210 ▲195.80 ▲0.92115.35 ▲12.0141.74 ▼3.59
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0338.80 ▼2.5834.15 ▼2.86
Add New Post /wp-admin/post-new.php1,517 ▼1617.47 ▼5.86664.43 ▲10.6853.61 ▼5.10
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.0295.18 ▼9.6541.36 ▼3.00
Video Lightbox /wp-admin/options-general.php?page=wp_video_lightbox8142.0328.5829.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • wpvl_enable_jquery
    • wpvl_enable_prettyPhoto
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpvl_plugin_version
    • wpvl_prettyphoto_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-video-lightbox/misc_functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-video-lightbox/wp-video-lightbox.php Passed 13 tests

The entry point to "WP Video Lightbox" version 1.9.10 is a PHP file that has certain tags in its header comment area
120 characters long description:
Simple video lightbox plugin to display videos in a nice overlay popup. It also supports images, flash, YouTube, iFrame.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected4,912 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,6054823,280
PHP410756901
CSS47811731

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.33
▷ Minimum class complexity2.00
▷ Maximum class complexity53.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
28 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prettyPhoto/default/sprite_next.png1.33KB0.39KB▼ 70.69%
images/prettyPhoto/light_rounded/btnPrevious.png1.41KB1.19KB▼ 15.74%
images/prettyPhoto/dark_rounded/btnNext.png1.38KB1.14KB▼ 17.29%
images/prettyPhoto/facebook/contentPatternBottom.png0.14KB0.11KB▼ 21.13%
images/prettyPhoto/light_square/btnPrevious.png1.41KB1.19KB▼ 15.74%