10% ultimate-gallery

Code Review | ULTIMATE VIDEO GALLERY

WordPress plugin ULTIMATE VIDEO GALLERY scored 10% from 54 tests.

About plugin

  • Plugin page: ultimate-gallery
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.6
  • WordPress version: 5.8.1
  • First release: Sep 24, 2012
  • Latest release: Sep 16, 2013
  • Number of updates: 16
  • Update frequency: every 22.6 days
  • Top authors: extendyourweb (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

800+ active / 57,023 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ultimate-gallery/init.php+449
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_ultimate has a deprecated constructor

Server metrics [RAM: ▼1.69MB] [CPU: ▼191.40ms] Passed 4 tests

A check of server-side resources used by ULTIMATE VIDEO GALLERY
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.786.45 ▼19.30
Dashboard /wp-admin1.96 ▼1.099.63 ▼37.11
Posts /wp-admin/edit.php1.96 ▼1.145.92 ▼47.41
Add New Post /wp-admin/post-new.php1.96 ▼3.475.95 ▼653.18
Media Library /wp-admin/upload.php1.96 ▼1.045.98 ▼27.88
ULTIMATE VIDEO /wp-admin/options-general.php?page=ultimate1.968.09

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 1 new option
New WordPress options
widget_wp_ultimate

Browser metrics Passed 4 tests

A check of browser resources used by ULTIMATE VIDEO GALLERY
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲21716.77 ▲1.1914.56 ▲4.3552.09 ▼1.38
Dashboard /wp-admin2,978 ▲415.91 ▼0.17147.34 ▼14.36116.73 ▼2.60
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0094.55 ▲22.9296.94 ▼2.63
Add New Post /wp-admin/post-new.php1,686 ▲9518.74 ▼0.03407.12 ▲8.31114.19 ▼3.83
Media Library /wp-admin/upload.php1,815 ▲85.02 ▲0.01159.63 ▼17.47130.30 ▼8.21
ULTIMATE VIDEO /wp-admin/options-general.php?page=ultimate1,3882.0959.00106.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ultimate-gallery/init.php+449
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_ultimate has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_wp_ultimate

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > Deprecated in wp-content/plugins/ultimate-gallery/init.php+449
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_ultimate has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > Deprecated in wp-content/plugins/ultimate-gallery/init.php+760
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in wp_ultimate is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > Notice in wp-content/plugins/ultimate-gallery/template/cabezera_panel.html+30
    Undefined variable: sizethumbnail
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ultimate
    • > Notice in wp-content/plugins/ultimate-gallery/template/cabezera_panel.html+40
    Undefined variable: op1

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-gallery/template/panel.php
    • > /wp-content/plugins/ultimate-gallery/css/style.php
  • 115× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 16
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 169
    • > PHP Notice
      Undefined variable: thumbnail_round in wp-content/plugins/ultimate-gallery/template/panel.php on line 323
    • > PHP Notice
      Undefined variable: op1 in wp-content/plugins/ultimate-gallery/template/panel.php on line 307
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 357
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 290
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 190
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 327
    • > PHP Notice
      Undefined variable: color1 in wp-content/plugins/ultimate-gallery/template/panel.php on line 358
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/ultimate-gallery/template/panel.php on line 186

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Sample.), #2 (sample.), #3 (Ultimate Admin.), #4 (Gallery admin.), #5 (Video admin.), #6 (Wordpress media.)
  • Tags: Too many tags (58 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

ultimate-gallery/init.php 92% from 13 tests

"ULTIMATE VIDEO GALLERY" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ultimate-gallery.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,184 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33592351,660
PHP46313031,172
HTML312815202
CSS1186150

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity54.00
▷ Minimum class complexity4.00
▷ Maximum class complexity104.00
Average method complexity5.42
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
24 PNG files occupy 0.25MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/play.png4.64KB1.62KB▼ 65.08%
template/icono4.png14.52KB3.36KB▼ 76.85%
images/next.png1.05KB1.10KB0.00%
images/textbg.png0.08KB0.09KB0.00%
images/next2.png35.49KB12.36KB▼ 65.18%