83% yotuwp-easy-youtube-embed

Code Review | Video Gallery - YouTube Playlist, Channel Gallery by YotuWP

WordPress plugin Video Gallery - YouTube Playlist, Channel Gallery by YotuWP scored 83% from 54 tests.

About plugin

  • Plugin page: yotuwp-easy-youtu...
  • Plugin version: 1.3.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Aug 19, 2023
  • Number of updates: 116
  • Update frequency: every 18.8 days
  • Top authors: yotuwp (100%)

Code review

54 tests

User reviews

305 reviews

Install metrics

30,000+ active / 314,777 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▲2.98ms] Passed 4 tests

An overview of server-side resources used by Video Gallery - YouTube Playlist, Channel Gallery by YotuWP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4644.85 ▲2.65
Dashboard /wp-admin3.84 ▲0.5379.44 ▲26.26
Posts /wp-admin/edit.php3.87 ▲0.5253.28 ▲8.04
Add New Post /wp-admin/post-new.php6.35 ▲0.4689.63 ▼5.63
Media Library /wp-admin/upload.php3.68 ▲0.4541.78 ▲6.84
General Settings /wp-admin/admin.php?page=yotuwp3.9044.15
Shortcode Generator /wp-admin/admin.php?page=yotuwp-shortcode3.6740.66

Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/yotuwp-easy-youtube-embed/" and "wp-content/uploads/"
    • (new file) wp-content/yotuwp_cache/.empty
Filesystem: 40 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
yotuwp_rating_date
yotuwp_install_date
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video Gallery - YouTube Playlist, Channel Gallery by YotuWP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.43 ▼0.921.66 ▼0.3745.20 ▼6.35
Dashboard /wp-admin2,241 ▲535.11 ▲0.26121.24 ▲4.6999.90 ▲54.54
Posts /wp-admin/edit.php2,148 ▲592.34 ▲0.3039.43 ▲4.5036.45 ▲3.61
Add New Post /wp-admin/post-new.php1,582 ▲6823.15 ▲5.67771.36 ▲117.7739.51 ▼36.53
Media Library /wp-admin/upload.php1,433 ▲424.48 ▲0.30100.31 ▲3.0879.65 ▲37.71
General Settings /wp-admin/admin.php?page=yotuwp2,7743.0762.4361.84
Shortcode Generator /wp-admin/admin.php?page=yotuwp-shortcode9502.0628.2330.95

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • yotuwp_install_date
    • widget_theysaidso_widget
    • yotuwp_rating_date
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/grid.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/list.php on line 4
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/yotuwp-easy-youtube-embed/templates/mix.php on line 3
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/yotuwp-easy-youtube-embed/templates/list.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/list.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/mix.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/grid.php on line 5
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/yotuwp-easy-youtube-embed/templates/list.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/yotuwp-easy-youtube-embed/templates/grid.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yotuwp-easy-youtube-embed/templates/mix.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please add descriptions for these screenshots #10, #8, #9 in yotuwp-easy-youtube-embed/assets to your readme.txt
The official readme.txt might help

yotuwp-easy-youtube-embed/yotuwp.php 92% from 13 tests

The primary PHP file in "Video Gallery - YouTube Playlist, Channel Gallery by YotuWP" version 1.3.13 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yotuwp-easy-youtube-embed.php" instead of "yotuwp.php")

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
There were no executable files found in this plugin6,297 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP9551712,542
CSS9152952,527
JavaScript4287141,198
SVG11030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity79.25
▷ Minimum class complexity23.00
▷ Maximum class complexity183.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods75
▷ Static methods34.00%
▷ Public methods7397.33%
▷ Protected methods00.00%
▷ Private methods22.67%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants3
▷ Global constants3100.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
9 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fields/pager_layout/default.png16.50KB1.77KB▼ 89.30%
assets/images/fields/pager_layout/center_no_text.png3.45KB1.37KB▼ 60.34%
assets/images/video-thumb.png7.50KB8.21KB0.00%
assets/images/yotu.png15.34KB1.06KB▼ 93.12%
assets/images/yotu-small.png10.36KB4.72KB▼ 54.44%