100% wp-youtube-gallery

Code Review | WP Youtube Gallery

WordPress plugin WP Youtube Gallery scored 100% from 54 tests.

About plugin

  • Plugin page: wp-youtube-gallery
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Aug 25, 2014
  • Latest release: Nov 17, 2021
  • Number of updates: 52
  • Update frequency: every 50.8 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active / 15,782 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼140.32ms] Passed 4 tests

A check of server-side resources used by WP Youtube Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2336.62 ▲16.75
Dashboard /wp-admin3.17 ▲0.1150.16 ▲4.90
Posts /wp-admin/edit.php3.22 ▲0.1246.97 ▲1.32
Add New Post /wp-admin/post-new.php5.53 ▲0.1090.75 ▼569.34
Media Library /wp-admin/upload.php3.11 ▲0.1134.27 ▲1.83
Add New Video /wp-admin/post-new.php?post_type=wp_youtube_gallery3.2451.24
Settings /wp-admin/edit.php?post_type=wp_youtube_gallery&page=wpyg-settings3.0831.44
All Videos /wp-admin/edit.php?post_type=wp_youtube_gallery3.1636.02
Categories /wp-admin/edit-tags.php?taxonomy=wp_youtube_gallery_taxonomy&post_type=wp_youtube_gallery3.1129.79

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Youtube Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲16815.95 ▲0.527.95 ▲0.0945.24 ▼6.95
Dashboard /wp-admin3,039 ▲1055.92 ▲0.04135.61 ▼8.52112.84 ▲2.27
Posts /wp-admin/edit.php2,807 ▲682.71 ▲0.0266.69 ▲2.1791.07 ▲1.40
Add New Post /wp-admin/post-new.php1,536 ▼2,15116.71 ▲1.61370.45 ▼79.67104.53 ▼5.69
Media Library /wp-admin/upload.php1,801 ▼35.07 ▲0.06149.97 ▲3.14115.58 ▲2.90
Add New Video /wp-admin/post-new.php?post_type=wp_youtube_gallery3,1418.94213.53129.38
Settings /wp-admin/edit.php?post_type=wp_youtube_gallery&page=wpyg-settings2,36213.46467.53160.95
All Videos /wp-admin/edit.php?post_type=wp_youtube_gallery1,4762.6473.4772.07
Categories /wp-admin/edit-tags.php?taxonomy=wp_youtube_gallery_taxonomy&post_type=wp_youtube_gallery1,7962.5461.7976.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

wp-youtube-gallery/wp-youtube-gallery.php Passed 13 tests

The primary PHP file in "WP Youtube Gallery" version 1.9 is used by WordPress to initiate all plugin functionality
132 characters long description:
A very simple and light weight youtube gallery plugin. Using shortcode you can add youtube video gallery on any page of the website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected532 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34083452
CSS30980

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected