10% wp-youtube-video-gallery

Code Review | WP Youtube Video Gallery

WordPress plugin WP Youtube Video Gallery scored10%from 54 tests.

About plugin

  • Plugin page: wp-youtube-video-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Aug 22, 2020
  • Number of updates: 5
  • Update frequency: every 5.2 days
  • Top authors: waqasvickey0071 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /705 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
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/index.php+49
    Undefined variable: test_db_version

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.41ms] Passed 4 tests

Analyzing server-side resources used by WP Youtube Video Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.77 ▼2.97
Dashboard /wp-admin3.42 ▲0.1250.83 ▲1.67
Posts /wp-admin/edit.php3.47 ▲0.1251.18 ▼3.28
Add New Post /wp-admin/post-new.php6.02 ▲0.14103.85 ▼1.05
Media Library /wp-admin/upload.php3.35 ▲0.1249.64 ▲15.17
YT Video Gallery /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage3.2953.21

Server storage [IO: ▲2.70MB] [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: 100 new files
Database: 1 new table, 7 new options
New tables
wp_wp_youtube_gallery
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
test_db_version
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Youtube Video Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17514.21 ▼0.359.83 ▲8.1739.96 ▼2.41
Dashboard /wp-admin2,227 ▲475.84 ▲0.1895.34 ▲7.7243.65 ▲1.40
Posts /wp-admin/edit.php2,134 ▲312.31 ▲0.2940.77 ▲0.3441.33 ▲4.21
Add New Post /wp-admin/post-new.php1,481 ▼5621.31 ▲3.101,036.82 ▲373.6365.44 ▲2.78
Media Library /wp-admin/upload.php1,426 ▲324.37 ▲0.08161.21 ▲60.7060.55 ▲13.05
YT Video Gallery /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage1,1672.1045.4649.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wp_youtube_gallery
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • test_db_version
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+176
    Undefined variable: videoTitleNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+189
    Undefined variable: playIconNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+202
    Undefined variable: shortDescNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+215
    Undefined variable: postedTimeNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+228
    Undefined variable: viewsNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+241
    Undefined variable: likesNo
    • > GET request to /wp-admin/options-general.php?page=wpYouTubeGalleryMainPage
    • > Notice in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php+254
    Undefined variable: commentsNo

SRP 50% 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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-youtube-video-gallery/admin/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-youtube-video-gallery/popup/videoPopup.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: video gallery, youtube gallery, youtube channel gallery

wp-youtube-video-gallery/index.php 92% from 13 tests

The primary PHP file in "WP Youtube Video Gallery" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-youtube-video-gallery.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected16,494 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS665445,384
SVG8033,491
Sass1638373,238
LESS1638493,226
PHP37349828
JavaScript34942327

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/sale.png16.24KB6.06KB▼ 62.66%
admin/images/count7/img.png14.06KB8.68KB▼ 38.27%
admin/images/count2/btn-like.png8.10KB4.52KB▼ 44.24%
admin/images/count3/btns.png11.19KB5.21KB▼ 53.45%
admin/images/count21/back1.png9.14KB4.94KB▼ 45.88%