83% ultimate-image-gallery

Code Review | Ultimate Image Gallery - Image Zoom, Viewer, Lightbox and Filter Gallery

WordPress plugin Ultimate Image Gallery - Image Zoom, Viewer, Lightbox and Filter Gallery scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-image-ga...
  • Plugin version: 1.0.06
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Nov 19, 2023
  • Number of updates: 22
  • Update frequency: every 11.6 days
  • Top authors: wdraihan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /830 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.44ms] Passed 4 tests

Server-side resources used by Ultimate Image Gallery - Image Zoom, Viewer, Lightbox and Filter Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1148.55 ▲3.11
Dashboard /wp-admin3.38 ▲0.0450.56 ▼12.51
Posts /wp-admin/edit.php3.44 ▲0.0846.88 ▼0.11
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.71 ▼4.26
Media Library /wp-admin/upload.php3.31 ▲0.0837.56 ▲4.59
Filter category /wp-admin/edit-tags.php?taxonomy=uig-filter-category&post_type=uig_image_gallery3.3137.12
All Galleries /wp-admin/edit.php?post_type=uig_image_gallery3.3842.56
Add Gallery /wp-admin/post-new.php?post_type=uig_image_gallery3.4546.15

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
uig-filter-category_default
uig-filter-category_children
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate Image Gallery - Image Zoom, Viewer, Lightbox and Filter Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15513.77 ▼0.6310.94 ▲8.6341.14 ▼10.04
Dashboard /wp-admin2,230 ▲535.62 ▼0.0584.92 ▼9.5738.11 ▼2.36
Posts /wp-admin/edit.php2,135 ▲322.06 ▲0.0535.48 ▼4.8533.47 ▼1.53
Add New Post /wp-admin/post-new.php1,556 ▲3023.44 ▼0.13596.00 ▼82.8847.64 ▼11.48
Media Library /wp-admin/upload.php1,438 ▲384.24 ▼0.0998.13 ▼2.1143.68 ▼1.16
Filter category /wp-admin/edit-tags.php?taxonomy=uig-filter-category&post_type=uig_image_gallery1,4172.1730.3631.21
All Galleries /wp-admin/edit.php?post_type=uig_image_gallery1,2703.3053.6831.45
Add Gallery /wp-admin/post-new.php?post_type=uig_image_gallery2,0003.6274.6150.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • uig-filter-category_children
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • uig-filter-category_default

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-image-gallery/templates/filter-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-image-gallery/templates/image-loop.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-image-gallery/includes/meta-fields.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-image-gallery/templates/gallery.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 23 tag instead of maximum 10
The official readme.txt is a good inspiration

ultimate-image-gallery/ultimate-image-gallery.php 85% from 13 tests

The main file in "Ultimate Image Gallery - Image Zoom, Viewer, Lightbox and Filter Gallery" v. 1.0.06 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,393 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46593802,232
CSS311030714
PHP87374447

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin