68% feeds-for-youtube

Code Review | Feeds for YouTube (YouTube video, channel, and gallery plugin)

WordPress plugin Feeds for YouTube (YouTube video, channel, and gallery plugin) scored68%from 54 tests.

About plugin

  • Plugin page: feeds-for-youtube
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: Sep 19, 2023
  • Number of updates: 115
  • Update frequency: every 12.0 days
  • Top authors: smashballoon (73.91%)Craig at Smash Balloon (26.96%)

Code review

54 tests

User reviews

145 reviews

Install metrics

60,000+ active /634,618 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲4.53MB] [CPU: ▲23.72ms] Passed 4 tests

Server-side resources used by Feeds for YouTube (YouTube video, channel, and gallery plugin)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.63 ▲3.1760.03 ▲14.54
Dashboard /wp-admin8.34 ▲4.9986.20 ▲20.44
Posts /wp-admin/edit.php8.39 ▲5.0378.50 ▲26.24
Add New Post /wp-admin/post-new.php10.88 ▲4.99130.17 ▲33.66
Media Library /wp-admin/upload.php8.20 ▲4.9773.54 ▲37.98
Settings /wp-admin/admin.php?page=youtube-feed-settings8.8885.11
Support /wp-admin/admin.php?page=youtube-feed-support8.8882.16
Twitter Feed /wp-admin/admin.php?page=sby-feed-builder&tab=more9.27100.21
All Feeds /wp-admin/admin.php?page=sby-feed-builder9.27100.45
About Us /wp-admin/admin.php?page=youtube-feed-about8.8877.64

Server storage [IO: ▲7.09MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 458 new files
Database: 3 new tables, 14 new options
New tables
wp_sby_feed_caches
wp_sby_feeds
wp_sby_feed_locator
New WordPress options
sby_license_data
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
sby_newuser_notifications
sby_notifications
sby_check_license_api_when_expires
widget_recent-comments
sby_usage_tracking_config
sby_license_status
...

Browser metrics Passed 4 tests

An overview of browser requirements for Feeds for YouTube (YouTube video, channel, and gallery plugin)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.21 ▼0.792.02 ▲0.2882.95 ▲38.49
Dashboard /wp-admin2,307 ▲1045.87 ▼0.03103.34 ▼1.4158.87 ▲18.76
Posts /wp-admin/edit.php2,201 ▲1012.13 ▲0.1441.54 ▲0.0852.97 ▲17.76
Add New Post /wp-admin/post-new.php1,594 ▲6324.10 ▲0.74654.57 ▼48.6842.94 ▼16.12
Media Library /wp-admin/upload.php1,484 ▲844.32 ▲0.08116.55 ▲7.6167.05 ▲17.42
Settings /wp-admin/admin.php?page=youtube-feed-settings1,2434.16114.3786.27
Support /wp-admin/admin.php?page=youtube-feed-support1,3403.9888.0139.27
Twitter Feed /wp-admin/admin.php?page=sby-feed-builder&tab=more4,9708.1055.8832.21
All Feeds /wp-admin/admin.php?page=sby-feed-builder4,9738.0656.3330.65
About Us /wp-admin/admin.php?page=youtube-feed-about1,1663.9053.7246.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (1) for the number of arguments passed (0). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 34× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/feeds-for-youtube/inc/Admin/admin-functions.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/free/feeds-type.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/feeds/legacy-feeds.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/screens/customizer.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/popup/license-learn-more.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/footer-banner/footer-pro.php
    • > /wp-content/plugins/feeds-for-youtube/templates/player.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/popup/feedtypes-popup.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/free/select-template.php
    • > /wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/empty-state.php
  • 155× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\YoutubeFeed\\Vendor\\DI\\Definition\\Helper\\DefinitionHelper' not found in wp-content/plugins/feeds-for-youtube/vendor/php-di/php-di/src/DI/Definition/Helper/FactoryDefinitionHelper.php:12
    • > PHP Warning
      Use of undefined constant CUSTOMIZER_ABSPATH - assumed 'CUSTOMIZER_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/screens/customizer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\YoutubeFeed\\Vendor\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/feeds-for-youtube/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'SmashBalloon\\YouTubeFeed\\Admin\\SBY_Admin_Abstract' not found in wp-content/plugins/feeds-for-youtube/inc/Admin/SBY_Admin.php:8
    • > PHP Warning
      include_once(): Failed opening 'CUSTOMIZER_ABSPATHtemplates/sections/feeds/feeds.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/sections/feeds-list.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'CUSTOMIZER_ABSPATHtemplates/sections/customizer/preview.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/screens/customizer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Smashballoon\\Stubs\\Services\\ServiceProvider' not found in wp-content/plugins/feeds-for-youtube/inc/Services/Admin/Settings/PagesServiceContainer.php:8
    • > PHP Warning
      include_once(): Failed opening 'CUSTOMIZER_ABSPATHtemplates/sections/customizer/sidebar.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/feeds-for-youtube/vendor/smashballoon/customizer/templates/screens/customizer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\YoutubeFeed\\Vendor\\Invoker\\InvokerInterface' not found in wp-content/plugins/feeds-for-youtube/vendor/php-di/php-di/src/DI/InvokerInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\YoutubeFeed\\Vendor\\DI\\Definition\\Helper\\DefinitionHelper' not found in wp-content/plugins/feeds-for-youtube/vendor/php-di/php-di/src/DI/Definition/Helper/StringDefinitionHelper.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: youtube, youtube gallery, youtube channel, youtube feed, youtube widget

feeds-for-youtube/youtube-feed.php 92% from 13 tests

Analyzing the main PHP file in "Feeds for YouTube (YouTube video, channel, and gallery plugin)" version 2.1.3
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("feeds-for-youtube.php" instead of "youtube-feed.php")

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 plugin50,932 lines of code in 413 files:
LanguageFilesBlank linesComment linesLines of code
PHP3064,3019,96431,027
CSS950627510,291
JavaScript196957226,722
Markdown1548001,168
JSON1100729
PO File1215220554
SVG4800234
YAML140130
XML211376
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.67
▷ Minimum class complexity1.00
▷ Maximum class complexity258.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces50
Interfaces22
Traits1
Classes216
▷ Abstract classes104.63%
▷ Concrete classes20695.37%
▷ Final classes20.97%
Methods1,382
▷ Static methods37326.99%
▷ Public methods1,25290.59%
▷ Protected methods211.52%
▷ Private methods1097.89%
Functions98
▷ Named functions8485.71%
▷ Anonymous functions1414.29%
Constants65
▷ Global constants4163.08%
▷ Class constants2436.92%
▷ Public constants2395.83%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
30 PNG files occupy 0.62MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
frontend/build/static/images/support-members.png6.12KB6.19KB0.00%
vendor/smashballoon/customizer/assets/img/sby_lightbox_player.png157.13KB169.63KB0.00%
img/sw-screenshot.png204.00KB92.39KB▼ 54.71%
vendor/container-interop/container-interop/docs/images/interoperating_containers.png25.13KB12.83KB▼ 48.97%
vendor/smashballoon/customizer/assets/img/sby_channel_logo.png0.60KB0.61KB0.00%