78% youtube-channel

Code Review | My YouTube Channel

WordPress plugin My YouTube Channel scored78%from 54 tests.

About plugin

  • Plugin page: youtube-channel
  • Plugin version: 3.23.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2011
  • Latest release: Aug 14, 2023
  • Number of updates: 205
  • Update frequency: every 22.1 days
  • Top authors: urkekg (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

8,000+ active /454,004 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▲8.39ms] Passed 4 tests

This is a short check of server-side resources used by My YouTube Channel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3455.10 ▲12.37
Dashboard /wp-admin3.87 ▲0.5663.70 ▲16.85
Posts /wp-admin/edit.php3.98 ▲0.6256.66 ▲8.03
Add New Post /wp-admin/post-new.php6.45 ▲0.56101.26 ▲9.21
Media Library /wp-admin/upload.php3.79 ▲0.5640.31 ▲3.96
My YouTube Channel /wp-admin/options-general.php?page=youtube-channel3.7637.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_youtube-channel
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

My YouTube Channel: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12414.49 ▲0.343.73 ▲1.9547.30 ▼2.25
Dashboard /wp-admin2,222 ▲485.84 ▲0.98102.29 ▼27.3740.46 ▼6.82
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0636.19 ▼2.3136.51 ▲2.85
Add New Post /wp-admin/post-new.php1,537 ▲321.19 ▼1.57652.86 ▲13.9554.94 ▼12.79
Media Library /wp-admin/upload.php1,407 ▲194.28 ▲0.11109.23 ▼2.6146.26 ▼1.05
My YouTube Channel /wp-admin/options-general.php?page=youtube-channel1,1382.1825.4231.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_youtube-channel

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-channel
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-channel
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-channel
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-channel
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/youtube-channel/templates/settings-usage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/youtube-channel/templates/settings-tools.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/youtube-channel/templates/settings-usage-shortcode.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: channel, widget, video, playlist, youtube

youtube-channel/youtube-channel.php 92% from 13 tests

"My YouTube Channel" version 3.23.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected6,262 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP104326122,952
PO File41,0411,6852,306
Sass35110585
JavaScript72025416
CSS3003

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.44
Average class complexity127.33
▷ Minimum class complexity68.00
▷ Maximum class complexity200.00
Average method complexity8.58
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/yt_play.png2.16KB2.05KB▼ 4.93%