89% album-and-image-gallery-plus-lightbox

Code Review | Album and Image Gallery plus Lightbox

WordPress plugin Album and Image Gallery plus Lightbox scored89%from 54 tests.

About plugin

  • Plugin page: album-and-image-g...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2016
  • Latest release: Nov 27, 2023
  • Number of updates: 94
  • Update frequency: every 28.3 days
  • Top authors: wponlinesupport (51.06%)anoopranawat (50%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10,000+ active /179,268 total downloads

Benchmarks

Plugin footprint 83% 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.11MB] [CPU: ▼5.13ms] Passed 4 tests

Server-side resources used by Album and Image Gallery plus Lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.36 ▼1.94
Dashboard /wp-admin3.40 ▲0.1046.00 ▼5.89
Posts /wp-admin/edit.php3.51 ▲0.1646.13 ▼3.17
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.77 ▼9.51
Media Library /wp-admin/upload.php3.32 ▲0.0933.81 ▲1.73

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 77 new files
Database: no new tables, 8 new options
New WordPress options
wpos_anylc_site_uid
widget_recent-posts
wpos_anylc_redirect
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Album and Image Gallery plus Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,548 ▼1,21412.77 ▼1.511.76 ▼0.0118.28 ▼27.28
Dashboard /wp-admin2,221 ▲445.57 ▼0.04101.22 ▲4.5351.93 ▲8.31
Posts /wp-admin/edit.php2,122 ▲192.02 ▼0.0135.66 ▼6.5331.57 ▼4.76
Add New Post /wp-admin/post-new.php6,221 ▲4,68419.18 ▼4.02874.01 ▲256.2560.93 ▲18.37
Media Library /wp-admin/upload.php1,422 ▲224.20 ▼0.0195.11 ▼12.7739.75 ▼4.17

Uninstaller [IO: ▲0.00MB] [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
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpos_anylc_site_uid
    • wpos_anylc_redirect
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (50 tag instead of maximum 10)
You can look at the official readme.txt

album-and-image-gallery-plus-lightbox/album-and-image-gallery.php 92% from 13 tests

The primary PHP file in "Album and Image Gallery plus Lightbox" version 1.9 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("album-and-image-gallery-plus-lightbox.php" instead of "album-and-image-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin5,276 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP378701,1414,118
CSS76119582
JavaScript817290574
JSON2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity20.75
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods52
▷ Static methods23.85%
▷ Public methods4892.31%
▷ Protected methods00.00%
▷ Private methods47.69%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants20100.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
20 compressed PNG files occupy 0.48MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpos-plugins/assets/images/essential-plugin-16.png0.46KB0.66KB0.00%
wpos-plugins/assets/images/utility-icon.png0.72KB0.82KB0.00%
wpos-plugins/assets/images/inbound50-by-50.png2.09KB1.95KB▼ 6.78%
wpos-plugins/assets/images/essential-plugin-50.png0.80KB1.07KB0.00%
assets/images/popup-icon/popup-design.png7.53KB4.51KB▼ 40.14%