73% gallery-master

Code Review | WordPress Photo Gallery by Gallery Master

WordPress plugin WordPress Photo Gallery by Gallery Master scored 73% from 54 tests.

About plugin

  • Plugin page: gallery-master
  • Plugin version: 2.0.18
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Nov 18, 2019
  • Number of updates: 110
  • Update frequency: every 15.1 days
  • Top authors: techprodigy (63.64%)contact-banker (37.27%)

Code review

54 tests

User reviews

34 reviews

Install metrics

700+ active / 119,375 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.71MB] [CPU: ▲8.11ms] Passed 4 tests

A check of server-side resources used by WordPress Photo Gallery by Gallery Master
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6338.82 ▼2.36
Dashboard /wp-admin4.14 ▲0.8357.56 ▲11.17
Posts /wp-admin/edit.php4.20 ▲0.8461.44 ▲13.87
Add New Post /wp-admin/post-new.php6.41 ▲0.5299.21 ▲9.77
Media Library /wp-admin/upload.php4.14 ▲0.9145.19 ▲14.26
/wp-admin/admin.php?page=gm_foo_box_free_edition4.3343.73
/wp-admin/admin.php?page=gm_masonry_layout4.3346.07
/wp-admin/admin.php?page=gm_advertisement4.3342.26
/wp-admin/admin.php?page=gm_order_by_settings4.3343.56
Other Settings /wp-admin/admin.php?page=gm_other_settings4.3343.55
/wp-admin/admin.php?page=gm_add_tag4.3342.72
/wp-admin/admin.php?page=gm_global_options4.3340.88
/wp-admin/admin.php?page=gm_search_box_settings4.3344.92
Shortcodes /wp-admin/admin.php?page=gm_shortcodes4.3340.51
/wp-admin/admin.php?page=gm_sort_galleries4.3344.44

Server storage [IO: ▲4.02MB] [DB: ▲0.05MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • You have illegally modified 80 files (3,239.31KB) outside of "wp-content/plugins/gallery-master/" and "wp-content/uploads/"
    • (new file) wp-content/gallery-master/original-images/bg-app.jpg
    • (new file) wp-content/gallery-master/original-images/bg-app-3.jpg
    • (new file) wp-content/gallery-master/original-images/after-1.jpg
    • (new file) wp-content/gallery-master/original-images/demo1-2.jpg
    • (new file) wp-content/gallery-master/original-images/bg-app-1.jpg
    • (new file) wp-content/gallery-master/original-images/after-2.jpg
    • (new file) wp-content/gallery-master/original-images/bg-app-2.jpg
    • (new file) wp-content/gallery-master/original-images/after.jpg
    • (new file) wp-content/gallery-master/original-images/demo1-1.jpg
    • (new file) wp-content/gallery-master/original-images/after-3.jpg
    • ...
Filesystem: 174 new files
Database: 2 new tables, 9 new options
New tables
wp_gallery_master_meta
wp_gallery_master
New WordPress options
can_compress_scripts
db_upgraded
gallery-master-key
widget_gallery_master_widget
gm_admin_notice
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Photo Gallery by Gallery Master
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,098 ▲36314.04 ▼0.354.86 ▲3.2437.51 ▼4.26
Dashboard /wp-admin2,340 ▲1524.96 ▼0.86107.61 ▼7.7780.21 ▲37.09
Posts /wp-admin/edit.php2,155 ▲871.99 ▼0.0739.30 ▲3.0834.89 ▲1.78
Add New Post /wp-admin/post-new.php8,244 ▲6,72520.25 ▼2.921,012.37 ▲318.7553.86 ▲2.44
Media Library /wp-admin/upload.php1,445 ▲574.20 ▲0.0299.79 ▼1.8778.69 ▲37.34
/wp-admin/admin.php?page=gm_foo_box_free_edition1,0601.9828.9645.08
/wp-admin/admin.php?page=gm_masonry_layout1,0572.0329.1234.08
/wp-admin/admin.php?page=gm_advertisement1,0611.9628.6832.80
/wp-admin/admin.php?page=gm_order_by_settings1,0172.0229.3236.73
Other Settings /wp-admin/admin.php?page=gm_other_settings1,0572.4228.0132.99
/wp-admin/admin.php?page=gm_add_tag1,0562.4227.6329.94
/wp-admin/admin.php?page=gm_global_options1,0611.9727.1128.82
/wp-admin/admin.php?page=gm_search_box_settings1,0632.0528.9633.89
Shortcodes /wp-admin/admin.php?page=gm_shortcodes1,0592.4427.9830.96
/wp-admin/admin.php?page=gm_sort_galleries1,0752.3636.2735.82

Uninstaller [IO: ▲3.16MB] [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 does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_gallery_master_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/gallery-master/lib/shortcode.php:63
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/gallery-master/lib/dashboard-widget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: photo gallery, gallery, album, responsive gallery, image gallery

gallery-master/gallery-master.php 85% from 13 tests

The main file in "WordPress Photo Gallery by Gallery Master" v. 2.0.18 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Plugin Name: A shorter plugin name is better (currently 88 characters long instead of max. 70)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/gallery-master/assets/global/plugins/pluploader/Moxie.xap
51,114 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP614341,28630,239
JavaScript178301,16911,237
CSS221,361898,197
SVG2001,441

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.88
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods39
▷ Static methods512.82%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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
45 PNG files occupy 0.13MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
assets/global/plugins/pluploader/img/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
assets/global/img/portlet-collapse-icon.png0.26KB0.25KB▼ 5.20%
assets/global/plugins/datatables/media/images/sort_desc.png0.15KB0.25KB0.00%
assets/admin/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%