83% video-youtube-lightbox

Code Review | Video Youtube Lightbox

WordPress plugin Video Youtube Lightbox scored83%from 54 tests.

About plugin

  • Plugin page: video-youtube-lig...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Aug 14, 2015
  • Number of updates: 13
  • Update frequency: every 9.9 days
  • Top authors: manudg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,668 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.31ms] Passed 4 tests

An overview of server-side resources used by Video Youtube Lightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.36 ▲4.69
Dashboard /wp-admin3.31 ▼0.0347.69 ▼16.87
Posts /wp-admin/edit.php3.36 ▲0.0143.86 ▼1.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.52 ▼0.48
Media Library /wp-admin/upload.php3.24 ▲0.0132.96 ▲1.67

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_video_youtube_lightbox
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Video Youtube Lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.93 ▼0.479.36 ▲7.5441.82 ▲1.19
Dashboard /wp-admin2,200 ▲115.79 ▲0.90100.91 ▼16.1337.01 ▼7.57
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0334.30 ▲1.0433.07 ▼5.24
Add New Post /wp-admin/post-new.php1,542 ▲818.41 ▼4.58600.73 ▲0.1955.28 ▲2.52
Media Library /wp-admin/upload.php1,382 ▼04.21 ▲0.0397.48 ▼0.2940.20 ▼4.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_video_youtube_lightbox

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/video-youtube-lightbox/index.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Lightbox), #2 (Playlist)
Please take inspiration from this readme.txt

video-youtube-lightbox/index.php 85% from 13 tests

This is the main PHP file of "Video Youtube Lightbox" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("video-youtube-lightbox.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected359 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15737195
JavaScript12121116
CSS1111248

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/left.png0.60KB0.53KB▼ 11.53%
images/right.png0.53KB0.46KB▼ 13.44%