84% youtubefancybox

Code Review | Video Lightbox for YouTube/Vimeo

WordPress plugin Video Lightbox for YouTube/Vimeo scored84%from 54 tests.

About plugin

  • Plugin page: youtubefancybox
  • Plugin version: 2.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Feb 4, 2014
  • Latest release: Jul 30, 2021
  • Number of updates: 50
  • Update frequency: every 58.8 days
  • Top authors: milindmore22 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /10,279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.84ms] Passed 4 tests

Server-side resources used by Video Lightbox for YouTube/Vimeo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.37 ▲0.45
Dashboard /wp-admin3.32 ▲0.0240.19 ▼6.06
Posts /wp-admin/edit.php3.37 ▲0.0250.36 ▼1.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.93 ▼20.17
Media Library /wp-admin/upload.php3.24 ▲0.0138.43 ▲3.79
Video Lightbox /wp-admin/admin.php?page=ytubefancybox3.2129.64
Youtube /wp-admin/admin.php?page=ytube3.2130.43
Vimeo /wp-admin/admin.php?page=vimeo3.2131.06

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Video Lightbox for YouTube/Vimeo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲22914.06 ▼0.329.33 ▲7.5541.12 ▼5.42
Dashboard /wp-admin2,233 ▲455.89 ▲0.00112.92 ▲13.1345.63 ▲0.86
Posts /wp-admin/edit.php2,113 ▲242.03 ▼0.0235.27 ▼6.2131.56 ▼5.09
Add New Post /wp-admin/post-new.php1,555 ▲1923.20 ▼0.21675.34 ▲55.9953.77 ▼1.32
Media Library /wp-admin/upload.php1,415 ▲304.20 ▼0.10100.31 ▲1.0043.05 ▲1.57
Video Lightbox /wp-admin/admin.php?page=ytubefancybox8642.0628.3728.01
Youtube /wp-admin/admin.php?page=ytube8722.0524.4526.05
Vimeo /wp-admin/admin.php?page=vimeo8692.0523.2324.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/youtubefancybox/youtubefancybox.php:208

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: amp, youtubefancybox, fancy box, lightbox youtube, lightbox...

youtubefancybox/youtubefancybox.php 85% from 13 tests

"Video Lightbox for YouTube/Vimeo" version 2.6.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,379 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript320697906
PHP386114389
CSS251960
Markdown111024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.67
▷ Minimum class complexity12.00
▷ Maximum class complexity15.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.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

All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/overlay.png0.11KB0.15KB0.00%
css/images/controls.png1.23KB1.28KB0.00%
css/images/loading_background.png0.13KB0.15KB0.00%
css/images/border.png0.07KB0.10KB0.00%