68% wp-load-gallery

Code Review | WP Load Gallery

WordPress plugin WP Load Gallery scored68%from 54 tests.

About plugin

  • Plugin page: wp-load-gallery
  • Plugin version: 2.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Jun 21, 2023
  • Number of updates: 46
  • Update frequency: every 23.0 days
  • Top authors: ngocuct0912 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /2,271 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▼8.78ms] Passed 4 tests

Server-side resources used by WP Load Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6748.64 ▲8.52
Dashboard /wp-admin3.97 ▲0.6250.74 ▼17.47
Posts /wp-admin/edit.php4.02 ▲0.6650.86 ▼0.32
Add New Post /wp-admin/post-new.php6.48 ▲0.5984.43 ▼22.60
Media Library /wp-admin/upload.php3.83 ▲0.6043.12 ▲5.29
Galleries /wp-admin/admin.php?page=wp-load-gallery4.2447.96
Cloud /wp-admin/admin.php?page=load_gallery_cloud3.8136.79

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 251 new files
Database: 1 new table, 8 new options
New tables
wp_wplg_gallery_items
New WordPress options
widget_theysaidso_widget
db_upgraded
wplg_version_1_0_0
widget_recent-comments
widget_recent-posts
widget_wplg_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Load Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.17 ▼1.101.94 ▲0.1243.08 ▲2.61
Dashboard /wp-admin2,229 ▲414.86 ▼1.04107.90 ▲4.6641.35 ▼3.86
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0435.73 ▼1.7333.30 ▼4.86
Add New Post /wp-admin/post-new.php6,374 ▲4,85227.76 ▲4.47901.64 ▲216.6359.22 ▲6.74
Media Library /wp-admin/upload.php1,408 ▲204.25 ▲0.03113.67 ▼1.4547.09 ▼6.71
Galleries /wp-admin/admin.php?page=wp-load-gallery4,7033.8779.7828.67
Cloud /wp-admin/admin.php?page=load_gallery_cloud9302.0422.9633.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_wplg_gallery_items
  • Zombie WordPress options detected upon uninstall: 8 options
    • wplg_version_1_0_0
    • widget_theysaidso_widget
    • widget_wplg_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 21× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-load-gallery/frontend/themes/default/default.php
    • > /wp-content/plugins/wp-load-gallery/admin/class/widget.php
    • > /wp-content/plugins/wp-load-gallery/frontend/themes/square_grid/square_grid.php
    • > /wp-content/plugins/wp-load-gallery/frontend/class/main-front.php
    • > /wp-content/plugins/wp-load-gallery/frontend/themes/post_grid/post_grid.php
    • > /wp-content/plugins/wp-load-gallery/frontend/themes/portfolio/portfolio.php
    • > /wp-content/plugins/wp-load-gallery/wp-load-gallery.php
    • > /wp-content/plugins/wp-load-gallery/admin/pages/gallery_details.php
    • > /wp-content/plugins/wp-load-gallery/admin/pages/trees.php
    • > /wp-content/plugins/wp-load-gallery/admin/pages/image_details.php
  • 75× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Appsactivity.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Manager.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Oauth2.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/AndroidEnterprise.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Audit.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Drive.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/AdExchangeSeller.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/Datastore.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/SQLAdmin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-load-gallery/includes/Google/Service/AndroidPublisher.php:31

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #3, #4, #5, #6, #7, #8, #9 in wp-load-gallery/assets to your readme.txt
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-load-gallery/wp-load-gallery.php Passed 13 tests

The main PHP file in "WP Load Gallery" ver. 2.1.6 adds more information about the plugin and also serves as the entry point for this plugin
81 characters long description:
Display image and video gallery from media library, server folder, Youtube, Vimeo

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 plugin190,036 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
PHP14110,91130,600160,018
JavaScript208,2095,04818,487
CSS102,19811310,525
SVG610832
JSX12222174

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.38
▷ Minimum class complexity1.00
▷ Maximum class complexity265.00
Average method complexity1.05
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes2,786
▷ Abstract classes60.22%
▷ Concrete classes2,78099.78%
▷ Final classes00.00%
Methods21,921
▷ Static methods470.21%
▷ Public methods21,85099.68%
▷ Protected methods340.16%
▷ Private methods370.17%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants245
▷ Global constants62.45%
▷ Class constants23997.55%
▷ Public constants239100.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.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/grid_arrow_left.png2.92KB2.08KB▼ 28.98%
assets/images/arrows_strip_left.png0.19KB0.12KB▼ 35.90%
assets/images/icon_zoom_plus.png0.33KB0.24KB▼ 29.12%
assets/images/play-button-square.png4.48KB1.62KB▼ 63.89%
assets/images/jpeg.png0.20KB0.22KB0.00%