10% youtube-simple-gallery

Code Review | YouTube Simple Gallery

WordPress plugin YouTube Simple Gallery scored10%from 54 tests.

About plugin

  • Plugin page: youtube-simple-ga...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2013
  • Latest release: May 1, 2015
  • Number of updates: 40
  • Update frequency: every 13.7 days
  • Top authors: chrdesigner (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

900+ active /39,511 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼0.52MB] [CPU: ▼14.75ms] Passed 4 tests

Server-side resources used by YouTube Simple Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.10 ▲0.03
Dashboard /wp-admin3.47 ▲0.1748.88 ▼1.16
Posts /wp-admin/edit.php3.56 ▲0.2154.77 ▲6.32
Add New Post /wp-admin/post-new.php3.32 ▼2.5738.98 ▼61.11
Media Library /wp-admin/upload.php3.39 ▲0.1639.53 ▲3.25
Add New /wp-admin/post-new.php?post_type=youtube-gallery3.3137.96
YSG Settings /wp-admin/themes.php?page=ysg_settings3.3436.55
Videos /wp-admin/edit.php?post_type=youtube-gallery3.4241.86
Categories /wp-admin/edit-tags.php?taxonomy=youtube-videos&post_type=youtube-gallery3.4840.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_ysg_widget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for YouTube Simple Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲23214.10 ▼0.325.80 ▲4.0140.94 ▼2.16
Dashboard /wp-admin2,253 ▲655.85 ▼0.1795.78 ▼20.4639.30 ▼5.16
Posts /wp-admin/edit.php2,139 ▲502.03 ▲0.0341.01 ▲3.4835.44 ▼1.83
Add New Post /wp-admin/post-new.php1,559 ▲4018.40 ▼4.77603.18 ▼47.8051.50 ▼1.99
Media Library /wp-admin/upload.php1,435 ▲504.31 ▲0.1197.93 ▲2.0542.56 ▲2.89
Add New /wp-admin/post-new.php?post_type=youtube-gallery1,9593.8561.8658.71
YSG Settings /wp-admin/themes.php?page=ysg_settings9502.1028.4536.35
Videos /wp-admin/edit.php?post_type=youtube-gallery1,0951.9932.4136.26
Categories /wp-admin/edit-tags.php?taxonomy=youtube-videos&post_type=youtube-gallery1,3152.1927.8629.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_ysg_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+149
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+141
    Undefined index: valor_url
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+146
    Undefined index: radio_similiar
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+147
    Undefined index: radio_controles
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+148
    Undefined index: radio_title
    • > GET request to /wp-admin/post-new.php?post_type=youtube-gallery
    • > Notice in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php+149
    Undefined index: valor_desc
    • > GET request to /wp-admin/themes.php?page=ysg_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=ysg_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/youtube-simple-gallery/admin/tinymce/chrUtube-tinymce-page.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/youtube-simple-gallery/single-youtube-gallery.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-simple-gallery/custom-post-youtube-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-simple-gallery/custom-taxonomy-youtube-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/youtube-simple-gallery/youtube-simple-gallery.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/youtube-simple-gallery/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/youtube-simple-gallery/content-list-gallery.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Side Tab Video), #2 (Listing page Videos), #3 (Registration Page Video), #4 (Page with the shortcode to the gallery creation), #5 (Box configuration shortcode), #6 (Setup screen plugin), #7 (Widget), #8 (Display page videos), #9 (Widget view the videos), #10 (Single Video Page)
The official readme.txt is a good inspiration

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

"YouTube Simple Gallery" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
114 characters long description:
YouTube Simple Gallery is a plugin you can create an area for YouTube videos quickly with management by shortcode.

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
Everything looks great! No dangerous files found in this plugin1,562 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP89970884
PO File3311506503
CSS53619149
JavaScript10026

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.20
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 1.10MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png248.03KB71.83KB▼ 71.04%
images/icon-youtube.png0.52KB0.61KB0.00%
screenshot-7.png26.30KB9.07KB▼ 65.50%
screenshot-4.png51.20KB17.28KB▼ 66.26%
screenshot-3.png276.24KB83.24KB▼ 69.87%