72% video-gallery-playlist

Code Review | FancyTube - Video Gallery, Video Slider, and Playlist Slider for YouTube

WordPress plugin FancyTube - Video Gallery, Video Slider, and Playlist Slider for YouTube scored72%from 54 tests.

About plugin

  • Plugin page: video-gallery-pla...
  • Plugin version: 2.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: May 14, 2020
  • Latest release: Jun 20, 2023
  • Number of updates: 40
  • Update frequency: every 28.5 days
  • Top authors: frohadpro (55%)grandplugin (42.5%)wpqode (7.5%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /9,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.09MB] [CPU: ▲6.89ms] Passed 4 tests

This is a short check of server-side resources used by FancyTube - Video Gallery, Video Slider, and Playlist Slider for YouTube
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1059.11 ▲9.73
Dashboard /wp-admin4.40 ▲1.0966.27 ▲9.39
Posts /wp-admin/edit.php4.45 ▲1.0962.98 ▲7.57
Add New Post /wp-admin/post-new.php7.01 ▲1.11105.79 ▲0.87
Media Library /wp-admin/upload.php4.32 ▲1.0950.15 ▲11.62
Help /wp-admin/edit.php?post_type=wpgp_youtube_gallery&page=grandplugin_help7.1855.88
Settings /wp-admin/edit.php?post_type=wpgp_youtube_gallery&page=wpgpyg_settings7.1875.69
Manage Galleries /wp-admin/edit.php?post_type=wpgp_youtube_gallery7.2666.80
Add New /wp-admin/post-new.php?post_type=wpgp_youtube_gallery7.2580.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by FancyTube - Video Gallery, Video Slider, and Playlist Slider for YouTube
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.84 ▼0.728.91 ▲6.8444.40 ▲1.02
Dashboard /wp-admin2,241 ▲675.61 ▲0.0995.39 ▼6.5441.95 ▲1.51
Posts /wp-admin/edit.php2,143 ▲402.00 ▲0.0239.59 ▲0.1733.33 ▼3.18
Add New Post /wp-admin/post-new.php1,561 ▲1323.67 ▲5.39656.23 ▲10.5853.61 ▼13.68
Media Library /wp-admin/upload.php1,446 ▲464.14 ▼0.11106.09 ▼0.2945.83 ▲1.65
Help /wp-admin/edit.php?post_type=wpgp_youtube_gallery&page=grandplugin_help1,96911.03350.73106.90
Settings /wp-admin/edit.php?post_type=wpgp_youtube_gallery&page=wpgpyg_settings1,4314.9281.2399.05
Manage Galleries /wp-admin/edit.php?post_type=wpgp_youtube_gallery1,3364.2553.9927.70
Add New /wp-admin/post-new.php?post_type=wpgp_youtube_gallery4,1565.18107.74154.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • _wpgp_option_settings
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/video-gallery-playlist/admin/partials/wpgp-youtube-gallery-admin-display.php
    • > /wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-slider.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'message' of non-object in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-grid.php on line 212
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpgpyg_get_post_meta() in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-button.php:3
    • > PHP Notice
      Undefined variable: wpgpyg_channel_id in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-query.php on line 18
    • > PHP Notice
      Undefined variable: wpgpyg_get_videos in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-grid.php on line 211
    • > PHP Notice
      Undefined variable: wpgpyg_get_videos in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-grid.php on line 212
    • > PHP Notice
      Undefined variable: wpgpyt_video_duration in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-query.php on line 7
    • > PHP Notice
      Undefined variable: wpgpyg_max_result in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-query.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-query.php:21
    • > PHP Notice
      Trying to get property 'error' of non-object in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-grid.php on line 211
    • > PHP Notice
      Undefined variable: wpgpyt_video_duration in wp-content/plugins/video-gallery-playlist/public/partials/wpgpyt-query.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=wpgp_youtube_gallery
    • > Network (severe)
    wp-content/plugins/video-gallery-playlist/admin/img/Scroll-layout.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: youtube gallery, youtube to gallery, gallery for youtube, youtube video gallery, youtube live...

video-gallery-playlist/wpgp-youtube-gallery.php 85% from 13 tests

The main file in "FancyTube - Video Gallery, Video Slider, and Playlist Slider for YouTube" v. 2.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("video-gallery-playlist.php" instead of "wpgp-youtube-gallery.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
No dangerous file extensions were detected29,049 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript112,2071,09915,176
PHP591,6261,3707,526
CSS104685996,334
SVG130013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity25.42
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity6.95
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes25.26%
▷ Concrete classes3694.74%
▷ Final classes00.00%
Methods157
▷ Static methods3019.11%
▷ Public methods15196.18%
▷ Protected methods00.00%
▷ Private methods63.82%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/layout_full.png9.04KB4.09KB▼ 54.74%
admin/img/-selfhosted.png1.68KB1.11KB▼ 33.92%
admin/img/get-api-key.png44.92KB22.32KB▼ 50.30%
admin/img/button.png1.79KB1.15KB▼ 35.45%
public/img/layout_default.png2.11KB1.46KB▼ 30.65%