89% multi-gallery

Code Review | Gallery

WordPress plugin Gallery scored89%from 54 tests.

About plugin

  • Plugin page: multi-gallery
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 6.3.1
  • First release: Nov 17, 2016
  • Latest release: Sep 2, 2021
  • Number of updates: 23
  • Update frequency: every 75.9 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /3,772 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.44 ▲4.44
Dashboard /wp-admin3.40 ▲0.0546.34 ▼12.64
Posts /wp-admin/edit.php3.51 ▲0.1546.15 ▼2.17
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.97 ▼15.56
Media Library /wp-admin/upload.php3.33 ▲0.1038.96 ▲6.18
Add New Gallery /wp-admin/post-new.php?post_type=wd_gallery3.5150.27
All Galleries /wp-admin/edit.php?post_type=wd_gallery3.4041.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
WD_Default_Settings
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9514.09 ▼0.512.01 ▲0.4043.85 ▲2.48
Dashboard /wp-admin2,234 ▲575.67 ▼0.0484.67 ▼2.0383.52 ▲40.64
Posts /wp-admin/edit.php2,139 ▲392.00 ▲0.0435.78 ▼3.5734.26 ▼1.31
Add New Post /wp-admin/post-new.php1,577 ▲4022.91 ▲4.62779.23 ▲157.3158.64 ▼2.70
Media Library /wp-admin/upload.php1,439 ▲394.25 ▲0.1296.86 ▼18.8777.79 ▲30.39
Add New Gallery /wp-admin/post-new.php?post_type=wd_gallery2,7283.9274.90142.02
All Galleries /wp-admin/edit.php?post_type=wd_gallery1,2983.5247.8061.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt might help

multi-gallery/gallery.php 77% from 13 tests

The principal PHP file in "Gallery" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 268 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("multi-gallery.php" instead of "gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin11,184 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS558177,675
JavaScript57863112,402
PHP913433818
SVG200289

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.25
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
42 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/incontent.png36.87KB10.94KB▼ 70.33%
lightbox/images/close.png4.13KB1.49KB▼ 63.97%
lightbox/images/prettyPhoto/default/sprite_y.png1.13KB0.13KB▼ 88.81%
lightbox/images/prettyPhoto/facebook/btnNext.png0.83KB0.57KB▼ 30.77%
lightbox/img/icons.png0.71KB0.43KB▼ 39.64%