77% youtube-embed-plus

Code Review | Embed Plus YouTube WordPress Plugin With YouTube Gallery, Channel, Playlist, Live Stream

WordPress plugin Embed Plus YouTube WordPress Plugin With YouTube Gallery, Channel, Playlist, Live Stream scored77%from 54 tests.

About plugin

  • Plugin page: youtube-embed-plus
  • Plugin version: 14.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 24, 2012
  • Latest release: Sep 11, 2023
  • Number of updates: 284
  • Update frequency: every 13.8 days
  • Top authors: embedplus (100%)

Code review

54 tests

User reviews

557 reviews

Install metrics

200,000+ active /7,387,174 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.47MB] [CPU: ▲0.14ms] Passed 4 tests

A check of server-side resources used by Embed Plus YouTube WordPress Plugin With YouTube Gallery, Channel, Playlist, Live Stream
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.88 ▲1.4244.71 ▼0.33
Dashboard /wp-admin4.90 ▲1.5952.00 ▼1.17
Posts /wp-admin/edit.php4.90 ▲1.5453.43 ▲4.16
Add New Post /wp-admin/post-new.php7.20 ▲1.3295.42 ▼2.12
Media Library /wp-admin/upload.php4.90 ▲1.6749.56 ▲15.30
YouTube Posts /wp-admin/admin.php?page=youtube-ep-glance4.9040.35
YouTube Wizard /wp-admin/admin.php?page=youtube-ep-wizard4.9037.42
YouTube Setup /wp-admin/admin.php?page=youtube-ep-onboarding4.9048.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Embed Plus YouTube WordPress Plugin With YouTube Gallery, Channel, Playlist, Live Stream
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲23814.20 ▼0.557.82 ▲5.7538.68 ▼4.85
Dashboard /wp-admin2,281 ▲905.26 ▲0.33116.83 ▲17.0442.20 ▼0.48
Posts /wp-admin/edit.php2,172 ▲832.64 ▲0.5845.02 ▲4.9132.82 ▼4.22
Add New Post /wp-admin/post-new.php1,564 ▲4423.45 ▲0.47681.34 ▼25.0541.94 ▼12.64
Media Library /wp-admin/upload.php1,471 ▲864.51 ▲0.35110.68 ▲9.7344.29 ▼1.74
YouTube Posts /wp-admin/admin.php?page=youtube-ep-glance7701.9832.6925.61
YouTube Wizard /wp-admin/admin.php?page=youtube-ep-wizard9662.3653.1024.84
YouTube Setup /wp-admin/admin.php?page=youtube-ep-onboarding3,25120.35455.06150.68

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • youtubeprefs_alloptions
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_complete.php
    • > /wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_success.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(EPYTVI_INCLUDES_PATHvi_login_success_content.php): failed to open stream: No such file or directory in wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_success.php on line 3
    • > PHP Warning
      Use of undefined constant EPYTVI_INCLUDES_PATH - assumed 'EPYTVI_INCLUDES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_success.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'EPYTVI_INCLUDES_PATHvi_login_success_content.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_success.php on line 3
    • > PHP Warning
      Use of undefined constant EPYTVI_INCLUDES_PATH - assumed 'EPYTVI_INCLUDES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_complete.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/youtube-embed-plus/includes/vi/vi_registration_form.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-embed-plus/includes/gutenberg/gutenberg_hooks.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/youtube-embed-plus/youtube.php:8732
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/youtube-embed-plus/includes/vi/vi_admin_menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-embed-plus/includes/vi/vi_actions.php:2
    • > PHP Warning
      include_once(): Failed opening 'EPYTVI_INCLUDES_PATHvi_login_success_content.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/youtube-embed-plus/includes/vi/vi_login_complete.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Embed Plus for YouTube WordPress Plugin Screenshot 1: Paste a YouTube link on its own line and it will become a YouTube embed on your website. Or, use the shortcode method.), #2 (Embed Plus for YouTube WordPress Plugin Screenshot 2: How to get to YouTube's admin settings), #3 (Embed Plus for YouTube WordPress Plugin Screenshot 3: Visual YouTube Wizard and Search Tool), #4 (Embed Plus for YouTube WordPress Plugin Screenshot 4: Wizard Insert Search Result Screenshot), #5 (Embed Plus for YouTube WordPress Plugin Screenshot 5: Wizard Search Results Screenshot), #6 (Embed Plus for YouTube WordPress Plugin Screenshot 6: Gallery layout for a playlist or channel), #7 (Embed Plus for YouTube WordPress Plugin Screenshot 7: YouTube playlist galleries are also easily supported. Here's the Billboard Top 25 Songs for example.), #8 (Embed Plus for YouTube WordPress Plugin Screenshot 8: Localization/internationalization so you can set the player's interface language), #9 (Embed Plus for YouTube WordPress Plugin Screenshot 9: Optional YouTube channel subscription button above gallery thumbnails)
Please take inspiration from this readme.txt

youtube-embed-plus/youtube.php 85% from 13 tests

"Embed Plus YouTube WordPress Plugin With YouTube Gallery, Channel, Playlist, Live Stream" version 14.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("youtube-embed-plus.php" instead of "youtube.php")
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected42,135 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript285,5495,81528,670
PHP97581678,118
CSS353641575,159
SVG70690
Sass48188
HTML10010

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity790.00
▷ Minimum class complexity790.00
▷ Maximum class complexity790.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods148
▷ Static methods14799.32%
▷ Public methods13289.19%
▷ Protected methods00.00%
▷ Private methods1610.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
100 PNG files occupy 2.08MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/btnprefsoff.png0.63KB0.53KB▼ 16.85%
images/icon-playlist-self.png2.20KB1.38KB▼ 37.02%
images/icongallery.png0.78KB1.07KB0.00%
images/deleted-video-thumb.png18.18KB2.49KB▼ 86.32%
images/globe.png1.76KB1.56KB▼ 11.23%