73% streamweasels-youtube-integration

Code Review | StreamWeasels YouTube Integration

WordPress plugin StreamWeasels YouTube Integration scored73%from 54 tests.

About plugin

  • Plugin page: streamweasels-you...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2022
  • Latest release: Nov 11, 2023
  • Number of updates: 21
  • Update frequency: every 20.5 days
  • Top authors: streamweasels (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /4,986 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 gracefully, with no errors

Server metrics [RAM: ▲5.15MB] [CPU: ▲31.86ms] 75% from 4 tests

Server-side resources used by StreamWeasels YouTube Integration
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.15MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4255.36 ▲16.08
Dashboard /wp-admin8.91 ▲5.6085.50 ▲32.43
Posts /wp-admin/edit.php8.91 ▲5.5586.54 ▲42.22
Add New Post /wp-admin/post-new.php9.89 ▲4.01129.86 ▲42.16
Media Library /wp-admin/upload.php8.91 ▲5.6870.48 ▲36.75
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9164.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 252 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
fs_accounts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
fs_active_plugins
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for StreamWeasels YouTube Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,120 ▲37316.26 ▲1.5510.11 ▲8.4827.54 ▼18.59
Dashboard /wp-admin2,387 ▲2106.44 ▲0.78123.23 ▲23.6248.26 ▲3.92
Posts /wp-admin/edit.php2,331 ▲2313.65 ▲1.7159.23 ▲23.7437.02 ▲3.64
Add New Post /wp-admin/post-new.php1,706 ▲17916.29 ▼6.88599.94 ▼98.9534.13 ▼25.58
Media Library /wp-admin/upload.php1,461 ▲614.45 ▲0.3190.49 ▼9.6248.11 ▼0.47
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,3093.3649.3231.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/streamweasels-youtube-integration/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • fs_active_plugins
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_debug_mode
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function syi_fs() in wp-content/plugins/streamweasels-youtube-integration/admin/partials/streamweasels-youtube-admin-sidebar.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/streamweasels-youtube-integration/admin/partials/streamweasels-youtube-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-youtube-integration/public/partials/streamweasels-youtube-public-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
8 plugin tags: youtube feed, youtube, youtube shorts, youtube live, youtube gallery...

streamweasels-youtube-integration/streamweasels-youtube.php 85% from 13 tests

Analyzing the main PHP file in "StreamWeasels YouTube Integration" version 1.1.8
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("streamweasels-youtube-integration.php" instead of "streamweasels-youtube.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin42,598 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,57517,90136,927
Sass1192953,530
JavaScript181532461,910
JSON400210
CSS221221

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity78.63
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods1,412
▷ Static methods20114.24%
▷ Public methods1,00571.18%
▷ Protected methods171.20%
▷ Private methods39027.62%
Functions114
▷ Named functions114100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/img/discord-logo.png2.35KB1.00KB▼ 57.64%
admin/img/sw-full-logo.png62.43KB26.24KB▼ 57.97%
admin/img/youtube-player-600x200.png13.55KB8.65KB▼ 36.20%
admin/img/youtube-showcase-600x200.png19.77KB13.96KB▼ 29.40%