89% easy-youtube-gallery

Code Review | Easy YouTube Gallery

WordPress plugin Easy YouTube Gallery scored89%from 54 tests.

About plugin

  • Plugin page: easy-youtube-gallery
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: Dec 28, 2020
  • Number of updates: 17
  • Update frequency: every 120.1 days
  • Top authors: urkekg (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active /11,656 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼3.54ms] Passed 4 tests

Analyzing server-side resources used by Easy YouTube Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.56 ▼1.95
Dashboard /wp-admin3.31 ▲0.0148.65 ▲2.29
Posts /wp-admin/edit.php3.36 ▲0.0146.15 ▼2.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.79 ▼3.75
Media Library /wp-admin/upload.php3.24 ▲0.0132.47 ▼5.96

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy YouTube Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.65 ▼0.735.61 ▲3.9743.14 ▲0.27
Dashboard /wp-admin2,203 ▲155.82 ▲0.9294.38 ▼11.4237.16 ▼1.89
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0438.83 ▼0.9635.01 ▼2.14
Add New Post /wp-admin/post-new.php1,532 ▲1823.22 ▲5.50586.62 ▼75.6051.37 ▼4.64
Media Library /wp-admin/upload.php1,382 ▼04.22 ▲0.07100.33 ▼2.9342.68 ▼1.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

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 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

easy-youtube-gallery/easy-youtube-gallery.php 92% from 13 tests

The main PHP file in "Easy YouTube Gallery" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,577 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6228147978
PHP14655180
CSS627195161
Sass2150147
SVG111111

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/play.png2.95KB2.05KB▼ 30.28%