72% tube-video-curator

Code Review | .TUBE Video Curator

WordPress plugin .TUBE Video Curator scored72%from 54 tests.

About plugin

  • Plugin page: tube-video-curator
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Nov 11, 2019
  • Number of updates: 56
  • Update frequency: every 22.0 days
  • Top authors: tubegtld (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /12,793 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: ▲1.18MB] [CPU: ▲2.72ms] Passed 4 tests

This is a short check of server-side resources used by .TUBE Video Curator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.61 ▲1.1441.88 ▼1.36
Dashboard /wp-admin4.51 ▲1.2155.32 ▲4.08
Posts /wp-admin/edit.php4.56 ▲1.2051.51 ▼0.29
Add New Post /wp-admin/post-new.php7.04 ▲1.15118.03 ▲17.71
Media Library /wp-admin/upload.php4.43 ▲1.2040.80 ▲8.45
Search for Videos /wp-admin/admin.php?page=tube-video-curator-find-videos4.4137.20
Your API Keys /wp-admin/admin.php?page=tube-video-curator-api-keys4.4037.19
Plugin Settings /wp-admin/admin.php?page=tube-video-curator-settings4.4138.20
Add Channels & Playlists /wp-admin/admin.php?page=tube-video-curator-find-sources4.4034.45
Your Channels & Playlists /wp-admin/edit.php?post_type=tube_source4.4839.34
Dashboard /wp-admin/admin.php?page=tube-video-curator4.3933.98
Skipped Videos /wp-admin/edit.php?post_type=tube_skipped_video4.4838.40
Add Video Via Url /wp-admin/admin.php?page=tube-video-curator-add-via-url4.4143.22

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 188 new files
Database: no new tables, 16 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
tube_vc_default_import_post_type
tube_vc_player_autohide
tube_vc_player_controls
tube_vc_player_related
tube_vc_player_autoplay
tube_vc_default_import_author
tube_vc_player_showinfo
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for .TUBE Video Curator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.18 ▼1.421.66 ▼0.8931.17 ▼12.93
Dashboard /wp-admin2,289 ▲1014.85 ▼1.14102.94 ▼6.8645.88 ▲4.28
Posts /wp-admin/edit.php2,169 ▲802.00 ▲0.0135.77 ▼0.1537.90 ▲4.08
Add New Post /wp-admin/post-new.php1,654 ▲13421.87 ▼1.40657.18 ▲7.5561.42 ▲3.07
Media Library /wp-admin/upload.php1,474 ▲894.29 ▲0.05100.10 ▼1.4945.34 ▼0.43
Search for Videos /wp-admin/admin.php?page=tube-video-curator-find-videos8492.1631.9530.31
Your API Keys /wp-admin/admin.php?page=tube-video-curator-api-keys1,0452.1627.0137.65
/wp-admin/admin.php?page=#280.440.083.52
Plugin Settings /wp-admin/admin.php?page=tube-video-curator-settings1,0531.7124.2935.05
Add Channels & Playlists /wp-admin/admin.php?page=tube-video-curator-find-sources8511.7125.9327.51
Your Channels & Playlists /wp-admin/edit.php?post_type=tube_source1,1431.9532.1935.64
Dashboard /wp-admin/admin.php?page=tube-video-curator9062.0223.2226.47
Skipped Videos /wp-admin/edit.php?post_type=tube_skipped_video1,1181.9832.4733.41
Add Video Via Url /wp-admin/admin.php?page=tube-video-curator-add-via-url8751.8030.3030.19

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 16 options in the database
    • tube_vc_video_placement
    • can_compress_scripts
    • tube_vc_player_showinfo
    • tube_vc_default_import_author
    • widget_recent-comments
    • theysaidso_admin_options
    • tube_vc_player_related
    • db_upgraded
    • tube_vc_player_autohide
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=tube-video-curator
    • > Warning in wp-content/plugins/tube-video-curator/classes/class-tube-vc-dashboard.php+401
    count(): Parameter must be an array or an object that implements Countable

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
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/PlusDomains.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tube-video-curator/lib/youtube-api/config.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/GroupsMigration.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/GamesManagement.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/Mirror.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/Audit.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/ShoppingContent.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Tube_VC_Source' not found in wp-content/plugins/tube-video-curator/classes/class-tube-vc-source-twitch-channel.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/Tasks.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/tube-video-curator/lib/youtube-api/src/Google/Service/Calendar.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=#
    • > Network (severe)
    wp-admin/admin.php?page=# - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

tube-video-curator/tube-video-curator.php 92% from 13 tests

".TUBE Video Curator" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected157,016 lines of code in 177 files:
LanguageFilesBlank linesComment linesLines of code
PHP16313,96130,602155,765
JavaScript428923479
CSS112317350
Markdown41240237
XML22841122
JSON31063

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.42
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity1.05
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces2
Interfaces2
Traits0
Classes2,760
▷ Abstract classes60.22%
▷ Concrete classes2,75499.78%
▷ Final classes00.00%
Methods21,715
▷ Static methods380.17%
▷ Public methods21,64499.67%
▷ Protected methods300.14%
▷ Private methods410.19%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants238
▷ Global constants52.10%
▷ Class constants23397.90%
▷ Public constants233100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/find-your-tube-domain-300x250.png30.03KB31.70KB0.00%