64% wp-gallery-manager

Code Review | WP Gallery Manager

WordPress plugin WP Gallery Manager scored64%from 54 tests.

About plugin

  • Plugin page: wp-gallery-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: Feb 24, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,781 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by WP Gallery Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.07 ▼2.03
Dashboard /wp-admin3.39 ▲0.0946.02 ▼7.01
Posts /wp-admin/edit.php3.42 ▲0.0746.03 ▼6.56
Add New Post /wp-admin/post-new.php6.10 ▲0.2181.73 ▼22.86
Media Library /wp-admin/upload.php3.33 ▲0.1043.95 ▲11.40
Gallery /wp-admin/admin.php?page=wp-gallery-manager3.3234.06
Settings /wp-admin/admin.php?page=wp-gallery-manager-settings3.3141.56
Images /wp-admin/admin.php?page=wp-gallery-manager-images3.3130.63

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: 3 new tables, 19 new options
New tables
wp_xyz_gal_gallery
wp_xyz_gal_images
wp_xyz_gal_mapping
New WordPress options
xyz_gal_thumb_width
xyz_gal_slideshow_interval
db_upgraded
xyz_gal_page_limit
widget_recent-posts
xyz_gal_gallery_height
xyz_gal_wp_gallery_override
xyz_gal_img_height
xyz_gal_img_width
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Gallery Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲18013.55 ▼0.739.21 ▲7.6142.77 ▲0.82
Dashboard /wp-admin2,231 ▲535.66 ▼0.0189.52 ▼20.0137.92 ▼1.51
Posts /wp-admin/edit.php2,147 ▲502.27 ▲0.2541.81 ▲1.9233.56 ▼5.88
Add New Post /wp-admin/post-new.php1,559 ▲3123.76 ▲0.63675.52 ▼28.6467.97 ▲16.77
Media Library /wp-admin/upload.php1,439 ▲394.25 ▲0.01109.60 ▲4.6447.78 ▲1.76
Gallery /wp-admin/admin.php?page=wp-gallery-manager1,0701.8525.8339.57
Settings /wp-admin/admin.php?page=wp-gallery-manager-settings1,2612.1029.6343.63
Images /wp-admin/admin.php?page=wp-gallery-manager-images1,0671.8424.7139.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function ' xyz_gallery_network_destroy' not found or invalid function name
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_xyz_gal_images
    • wp_xyz_gal_mapping
    • wp_xyz_gal_gallery
  • Zombie WordPress options detected upon uninstall: 19 options
    • xyz_gal_thumb_width
    • widget_theysaidso_widget
    • xyz_gal_img_height
    • db_upgraded
    • xyz_gal_img_width
    • xyz_credit_link
    • xyz_gal_page_limit
    • xyz_gal_thumb_height
    • xyz_gal_wpgal_responsive
    • xyz_gal_gallery_width
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-gallery-manager-images
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: wordpress image gallery, free gallery, gallery manager, responsive gallery, gallery...

wp-gallery-manager/wp-gallery-manager.php 92% from 13 tests

The main PHP file in "WP Gallery Manager" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 436 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,988 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,127923,485
CSS215810491
JavaScript13012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/linkedin.png3.19KB0.77KB▼ 75.96%
images/star.png3.35KB0.83KB▼ 75.35%
images/facebook.png0.59KB0.66KB0.00%
images/donate.png3.45KB0.72KB▼ 78.97%
images/xyz_logo.png9.26KB3.02KB▼ 67.36%