73% ultimate-wp-multimedia-gallery

Code Review | Ultimate WP Multimedia Gallery

WordPress plugin Ultimate WP Multimedia Gallery scored73%from 54 tests.

About plugin

  • Plugin page: ultimate-wp-multi...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2021
  • Latest release: Jul 10, 2021
  • Number of updates: 8
  • Update frequency: every 22.2 days
  • Top authors: yeelloo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /431 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: ▲0.21MB] [CPU: ▲0.78ms] Passed 4 tests

Analyzing server-side resources used by Ultimate WP Multimedia Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2147.48 ▲3.12
Dashboard /wp-admin3.51 ▲0.2160.38 ▲5.31
Posts /wp-admin/edit.php3.61 ▲0.2564.02 ▲16.59
Add New Post /wp-admin/post-new.php6.11 ▲0.2295.36 ▼9.75
Media Library /wp-admin/upload.php3.43 ▲0.2044.15 ▲4.44
Galleries /wp-admin/admin.php?page=wpm-gallery3.4040.63
Add Gallery /wp-admin/admin.php?page=wpm-gallery-add3.5044.73
Settings /wp-admin/admin.php?page=wpmg-settings3.4244.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 83 new files
Database: 3 new tables, 7 new options
New tables
wp_a_wpmg_gallery_item_tag_terms
wp_a_wpmg_gallery_items
wp_a_wpmg_gallery
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
wpmg_db_version
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate WP Multimedia Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.71 ▼0.591.86 ▼0.3248.81 ▲6.06
Dashboard /wp-admin2,224 ▲364.91 ▼0.91126.02 ▲11.1193.03 ▲48.93
Posts /wp-admin/edit.php2,125 ▲332.06 ▲0.0542.55 ▲2.3136.46 ▼3.09
Add New Post /wp-admin/post-new.php1,549 ▲2522.93 ▼0.17769.52 ▲50.1249.60 ▼21.04
Media Library /wp-admin/upload.php1,412 ▲244.22 ▼0.01110.96 ▼11.8381.34 ▲31.44
Galleries /wp-admin/admin.php?page=wpm-gallery8732.1128.4631.34
Add Gallery /wp-admin/admin.php?page=wpm-gallery-add1,0373.1146.4284.23
Settings /wp-admin/admin.php?page=wpmg-settings1,1322.1127.7640.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_a_wpmg_gallery_item_tag_terms
    • wp_a_wpmg_gallery_items
    • wp_a_wpmg_gallery
  • The uninstall procedure has failed, leaving 7 options in the database
    • wpmg_db_version
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ultimate-wp-multimedia-gallery/admin/inc/admin-add-new-gallery-thickbox.tpl.php

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • License uri: Please fix this invalid URI: "GPLv2 or later"
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in ultimate-wp-multimedia-gallery/assets to your readme.txt
Please take inspiration from this readme.txt

ultimate-wp-multimedia-gallery/uwmg.php 85% from 13 tests

The main PHP script in "Ultimate WP Multimedia Gallery" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ultimate-wp-multimedia-gallery.php" instead of "uwmg.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

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
Success! There were no dangerous files found in this plugin2,693 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12183531,441
CSS216652
JavaScript49760600

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.00
▷ Minimum class complexity3.00
▷ Maximum class complexity48.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods3895.00%
▷ Public methods3792.50%
▷ Protected methods00.00%
▷ Private methods37.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
front/images/prettyPhoto/dark_square/sprite.png3.42KB2.13KB▼ 37.67%
front/images/wpm-social-networks-logos.png6.35KB3.02KB▼ 52.42%
front/images/thumbnails/flash-logo.png6.26KB3.92KB▼ 37.35%
front/images/prettyPhoto/dark_square/contentPattern.png0.12KB0.09KB▼ 20.66%
front/images/prettyPhoto/default/sprite_prev.png1.34KB0.38KB▼ 71.73%