78% wp-ultimate-gallery

Code Review | WordPress Ultimate Gallery

WordPress plugin WordPress Ultimate Gallery scored78%from 54 tests.

About plugin

  • Plugin page: wp-ultimate-gallery
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Jul 4, 2016
  • Number of updates: 28
  • Update frequency: every 1.9 days
  • Top authors: raselahmed7 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /5,152 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▼5.61ms] Passed 4 tests

A check of server-side resources used by WordPress Ultimate Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5241.39 ▼18.81
Dashboard /wp-admin4.01 ▲0.6756.70 ▲4.70
Posts /wp-admin/edit.php4.03 ▲0.6452.74 ▼3.65
Add New Post /wp-admin/post-new.php6.60 ▲0.6892.20 ▼4.67
Media Library /wp-admin/upload.php3.93 ▲0.6645.29 ▲7.38
Galleries /wp-admin/edit.php?post_type=wp-ultimate-gallery3.9143.29
Gallery Settings /wp-admin/edit.php?post_type=wp-ultimate-gallery&page=gallery-settings3.8437.52
Add New /wp-admin/post-new.php?post_type=wp-ultimate-gallery4.3759.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Ultimate Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20013.65 ▼0.7014.34 ▲11.8641.42 ▼17.85
Dashboard /wp-admin2,234 ▲605.63 ▲0.0589.63 ▼11.9442.44 ▼2.63
Posts /wp-admin/edit.php2,142 ▲452.02 ▼0.1136.04 ▼3.1235.84 ▲3.63
Add New Post /wp-admin/post-new.php1,559 ▲3123.41 ▲0.25708.91 ▲47.3374.72 ▲23.52
Media Library /wp-admin/upload.php1,445 ▲424.24 ▼0.04100.25 ▲1.5046.91 ▲0.15
Galleries /wp-admin/edit.php?post_type=wp-ultimate-gallery1,1211.9936.5636.34
Gallery Settings /wp-admin/edit.php?post_type=wp-ultimate-gallery&page=gallery-settings1,8542.6642.7248.45
Add New /wp-admin/post-new.php?post_type=wp-ultimate-gallery3,4334.53110.4749.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=wp-ultimate-gallery
    • > Notice in wp-content/plugins/wp-ultimate-gallery/admin/admin-shortcode-generator.php+22
    Undefined variable: shortcode_column_lang_text
    • > GET request to /wp-admin/edit.php?post_type=wp-ultimate-gallery
    • > Notice in wp-content/plugins/wp-ultimate-gallery/admin/admin-shortcode-generator.php+23
    Undefined variable: images_column_lang_text
    • > GET request to /wp-admin/edit.php?post_type=wp-ultimate-gallery
    • > Notice in wp-content/plugins/wp-ultimate-gallery/admin/admin-shortcode-generator.php+24
    Undefined variable: type_column_lang_text

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-ultimate-gallery/admin/admin-gallery-custom-messages.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-ultimate-gallery/admin/gallery-shortcode.php:621
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-ultimate-gallery/admin/admin-plugin-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ultimate-gallery/admin/plugin-assets.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-ultimate-gallery/admin/media-extra-fields.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-ultimate-gallery/admin/admin-shortcode-generator.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ultimate-gallery/libs/cmb2-conditions/cmb-conditions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ultimate-gallery/admin/gallery-metabox.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-ultimate-gallery/wp-ultimate-gallery.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ultimate-gallery/libs/cmb2/init.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-ultimate-gallery === )
You can take inspiration from this readme.txt

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

The entry point to "WordPress Ultimate Gallery" version 1.7 is a PHP file that has certain tags in its header comment area
60 characters long description:
This plugin will multi style gallery in your wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin16,704 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
CSS152,1612,1059,795
PHP251,3262,3044,613
Sass11168231,116
JavaScript12219223922
PO File1107137245
SVG10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity40.31
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods233
▷ Static methods2410.30%
▷ Public methods21893.56%
▷ Protected methods93.86%
▷ Private methods62.58%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
libs/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
libs/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
libs/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
libs/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%