10% utubevideo-gallery

Code Review | uTubeVideo Gallery

WordPress plugin uTubeVideo Gallery scored10%from 54 tests.

About plugin

  • Plugin page: utubevideo-gallery
  • Plugin version: 2.0.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2013
  • Latest release: May 25, 2023
  • Number of updates: 59
  • Update frequency: every 63.4 days
  • Top authors: dman25560 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /34,815 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/utubevideo-gallery/src/Service/Maintenance.php+121
    copy(http://wp.com/wp-content/plugins/utubevideo-gallery/src/Service/public/img/missing.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

Server metrics [RAM: ▼0.40MB] [CPU: ▼13.10ms] Passed 4 tests

An overview of server-side resources used by uTubeVideo Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2741.25 ▼2.41
Dashboard /wp-admin3.62 ▲0.3157.95 ▲9.78
Posts /wp-admin/edit.php3.67 ▲0.3154.47 ▲5.25
Add New Post /wp-admin/post-new.php3.44 ▼2.4536.99 ▼57.36
Media Library /wp-admin/upload.php3.48 ▲0.2540.68 ▲2.12

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 208 new files
Database: 4 new tables, 7 new options
New tables
wp_utubevideo_dataset
wp_utubevideo_album
wp_utubevideo_video
wp_utubevideo_playlist
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
utubevideo_main_opts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for uTubeVideo Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲25415.70 ▲1.3418.01 ▲16.2939.80 ▼17.47
Dashboard /wp-admin2,228 ▲406.53 ▲1.65135.23 ▲27.2444.01 ▲1.10
Posts /wp-admin/edit.php2,123 ▲343.39 ▲1.3852.21 ▲12.5237.04 ▲3.10
Add New Post /wp-admin/post-new.php1,540 ▲1223.98 ▲0.73631.37 ▼24.9934.35 ▼27.38
Media Library /wp-admin/upload.php1,422 ▲375.87 ▲1.49128.70 ▲6.4546.62 ▼0.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/utubevideo-gallery/uninstall.php+48
    rmdir(wp-content/uploads/utubevideo-cache): Directory not empty
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/utubevideo-gallery/tests/bootstrap.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/VimeoPlaylistAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/utubevideo-gallery/tests/test-sample.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/AlbumOrderAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/YouTubePlaylistAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/AlbumAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Dscarberry\\UTubeVideoGallery\\get_option() in wp-content/plugins/utubevideo-gallery/utubevideo.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/GalleryAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/SettingsAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/VideoAPIv1.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Dscarberry\\UTubeVideoGallery\\Controller\\API\\APIv1' not found in wp-content/plugins/utubevideo-gallery/src/Controller/API/PlaylistAPIv1.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: youtube, vimeo, video, gallery

utubevideo-gallery/utubevideo.php 85% from 13 tests

"uTubeVideo Gallery" version 2.0.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("utubevideo-gallery.php" instead of "utubevideo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin18,575 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,008
JavaScript1147661955,380
PHP528893734,088
Sass13229121,311
Markdown21140302
PO File1138174296
Bourne Shell12111123
XML241249
YAML1101716
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.14
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes49
▷ Abstract classes12.04%
▷ Concrete classes4897.96%
▷ Final classes00.00%
Methods326
▷ Static methods7823.93%
▷ Public methods27985.58%
▷ Protected methods00.00%
▷ Private methods4714.42%
Functions46
▷ Named functions36.52%
▷ Anonymous functions4393.48%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 13.25MB with 4.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png1,420.25KB422.69KB▼ 70.24%
public/img/play_icon_blue.png0.88KB1.08KB0.00%
screenshot-6.png449.79KB109.17KB▼ 75.73%
public/img/resource/play.vimeo.png1.16KB1.35KB0.00%
public/img/play_icon.png0.54KB0.34KB▼ 37.18%