68% ultimate-member-gallery

Code Review | Ultimate Member Gallery

WordPress plugin Ultimate Member Gallery scored68%from 54 tests.

About plugin

  • Plugin page: ultimate-member-g...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Sep 2, 2015
  • Number of updates: 25
  • Update frequency: every 4.2 days
  • Top authors: maksbd19 (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

90+ active /9,774 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.00ms] Passed 4 tests

Server-side resources used by Ultimate Member Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.77 ▲1.36
Dashboard /wp-admin3.31 ▲0.0048.30 ▼2.41
Posts /wp-admin/edit.php3.36 ▲0.0050.28 ▲2.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.90 ▼20.59
Media Library /wp-admin/upload.php3.23 ▲0.0036.43 ▼2.35

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 116 new files
Database: 1 new table, 7 new options
New tables
wp_ultimate_member_gallery_user_contents
New WordPress options
db_upgraded
theysaidso_admin_options
ultimate_member_gallery_db_version
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Member Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.41 ▲0.121.93 ▲0.0143.60 ▼0.19
Dashboard /wp-admin2,211 ▲375.69 ▲0.0293.25 ▼1.1040.04 ▼5.47
Posts /wp-admin/edit.php2,111 ▲112.02 ▼0.0135.65 ▲0.4434.38 ▼0.89
Add New Post /wp-admin/post-new.php1,539 ▲1123.42 ▲0.37681.12 ▲29.8765.61 ▼1.92
Media Library /wp-admin/upload.php1,413 ▲164.25 ▲0.11114.92 ▲11.6849.01 ▲1.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ultimate_member_gallery_user_contents
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • ultimate_member_gallery_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ultimate-member-gallery/lib/upload/um-image-upload.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_user() in wp-content/plugins/ultimate-member-gallery/templates/profile/gallery.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_user() in wp-content/plugins/ultimate-member-gallery/templates/profile/video.php:5

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 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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Screenshot 1), #2 (Screenshot 2), #3 (Screenshot 3), #4 (Screenshot 4), #5 (Screenshot 5), #6 (Screenshot 6), #7 (Screenshot 8)
The official readme.txt is a good inspiration

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

The main file in "Ultimate Member Gallery" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
An extension for the Ultimate Member plugin to allow users to upload multiple gallery images in teir profile.

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
There were no executable files found in this plugin16,229 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript293,1026,90913,259
CSS5252221,038
PHP5366105867
LESS1151275812
HTML3408225
SVG10028

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
38 PNG files occupy 2.33MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/prettyphoto/images/prettyPhoto/dark_square/btnNext.png1.38KB1.14KB▼ 17.29%
assets/prettyphoto/images/thumbnails/flash-logo.png6.26KB3.92KB▼ 37.35%
screenshot-6.png230.79KB132.38KB▼ 42.64%
assets/prettyphoto/images/prettyPhoto/facebook/sprite.png4.13KB2.26KB▼ 45.33%
assets/prettyphoto/images/prettyPhoto/light_square/btnPrevious.png1.41KB1.19KB▼ 15.74%