62% gallery-for-ultimate-member

Code Review | Gallery for Ultimate Member

WordPress plugin Gallery for Ultimate Member scored62%from 54 tests.

About plugin

  • Plugin page: gallery-for-ultim...
  • Plugin version: 1.0.5.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: May 17, 2023
  • Number of updates: 37
  • Update frequency: every 65.3 days
  • Top authors: suiteplugins (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /13,736 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.39MB] [CPU: ▲3.96ms] Passed 4 tests

Analyzing server-side resources used by Gallery for Ultimate Member
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.69 ▲1.2252.91 ▲11.96
Dashboard /wp-admin4.80 ▲1.4956.27 ▲0.46
Posts /wp-admin/edit.php4.85 ▲1.4956.52 ▲4.22
Add New Post /wp-admin/post-new.php7.34 ▲1.45103.36 ▲5.22
Media Library /wp-admin/upload.php4.66 ▲1.4249.39 ▲5.93
Settings /wp-admin/admin.php?page=um_gallery_pro_settings4.6849.51
Albums /wp-admin/admin.php?page=um_gallery4.6343.26

Server storage [IO: ▲6.43MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 591 new files
Database: 5 new tables, 9 new options
New tables
wp_um_gallery
wp_um_gallery_comments
wp_um_gallery_meta
wp_um_gallery_favorites
wp_um_gallery_album
New WordPress options
um_gallery_version
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_widget_recent_photos
db_upgraded
um_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gallery for Ultimate Member
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.89 ▼0.491.67 ▼0.1244.52 ▼1.75
Dashboard /wp-admin2,251 ▲635.39 ▼0.42112.84 ▼6.8642.33 ▼1.93
Posts /wp-admin/edit.php2,113 ▲242.45 ▲0.4436.23 ▼1.4034.97 ▲1.37
Add New Post /wp-admin/post-new.php1,567 ▲3418.64 ▼4.43602.92 ▼17.4735.63 ▼15.19
Media Library /wp-admin/upload.php1,444 ▲564.75 ▲0.4788.76 ▼17.5643.77 ▼6.53
Settings /wp-admin/admin.php?page=um_gallery_pro_settings8542.3032.0128.26
Albums /wp-admin/admin.php?page=um_gallery9582.2129.8626.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 5 tables
    • wp_um_gallery_favorites
    • wp_um_gallery_album
    • wp_um_gallery
    • wp_um_gallery_meta
    • wp_um_gallery_comments
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_widget_recent_photos
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • um_options
    • um_gallery_version
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/apigen/hook-docs.php
  • 63× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/gallery-for-ultimate-member/includes/um-gallery-admin-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_profile_id() in wp-content/plugins/gallery-for-ultimate-member/templates/um-gallery/content-carousel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gallery-for-ultimate-member/templates/um-gallery/albums.php:30
    • > PHP Warning
      file_put_contents(/Users/JT/Sites/wpengine/api/hook-docs.html): failed to open stream: No such file or directory in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/apigen/hook-docs.php on line 229
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gallery-for-ultimate-member/includes/um-gallery-admin-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/gallery-for-ultimate-member/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=um_gallery
    • > Network (severe)
    wp-content/plugins/gallery-for-ultimate-member/assets/css/src/jquery.tagit.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=um_gallery
    • > Network (severe)
    wp-content/plugins/gallery-for-ultimate-member//assets/js/src/dropzone.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=um_gallery
    • > Network (severe)
    wp-content/plugins/gallery-for-ultimate-member/assets/js/src/tag-it.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=um_gallery
    • > Javascript (severe) in unknown
    /wp-content/plugins/gallery-for-ultimate-member/admin/assets/js/um-gallery-admin.js?ver=6.3.1 6:0 Uncaught ReferenceError: Dropzone is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

gallery-for-ultimate-member/gallery-for-ultimate-member.php 92% from 13 tests

The primary PHP file in "Gallery for Ultimate Member" version 1.0.5.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin98,545 lines of code in 393 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1298,8957,83335,209
PO File12114,63420,04233,078
PHP953,0228,28212,595
CSS276521,4089,568
JSON4006,684
Sass17306291,411

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.88
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes85
▷ Abstract classes910.59%
▷ Concrete classes7689.41%
▷ Final classes00.00%
Methods751
▷ Static methods12716.91%
▷ Public methods64485.75%
▷ Protected methods9412.52%
▷ Private methods131.73%
Functions89
▷ Named functions8797.75%
▷ Anonymous functions22.25%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/resize.png0.12KB0.10KB▼ 13.22%
vendor/cmb2/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
vendor/cmb2/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ico-delete.png0.70KB0.72KB0.00%