84% simple-lightbox-gallery

Code Review | Lightbox slider - Responsive Lightbox Gallery

WordPress plugin Lightbox slider - Responsive Lightbox Gallery scored84%from 54 tests.

About plugin

  • Plugin page: simple-lightbox-g...
  • Plugin version: 1.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Oct 27, 2023
  • Number of updates: 81
  • Update frequency: every 37.2 days
  • Top authors: weblizar (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

6,000+ active /319,818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.54ms] Passed 4 tests

A check of server-side resources used by Lightbox slider - Responsive Lightbox Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1836.31 ▲1.22
Dashboard /wp-admin3.53 ▲0.1847.99 ▼12.97
Posts /wp-admin/edit.php3.63 ▲0.2746.33 ▲0.35
Add New Post /wp-admin/post-new.php6.13 ▲0.2480.21 ▼14.75
Media Library /wp-admin/upload.php3.46 ▲0.2236.45 ▲5.06
Help and Support /wp-admin/edit.php?post_type=slgf_slider&page=SLGF-help-page3.4530.10
Add Lightbox Gallery /wp-admin/post-new.php?post_type=slgf_slider3.7648.72
All Galleries /wp-admin/edit.php?post_type=slgf_slider3.5034.07

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Lightbox slider - Responsive Lightbox Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.35 ▲0.171.61 ▲0.0040.40 ▲2.22
Dashboard /wp-admin2,240 ▲605.61 ▲0.0083.88 ▼0.9937.68 ▼7.03
Posts /wp-admin/edit.php2,142 ▲422.04 ▲0.0433.61 ▼1.3434.39 ▼4.46
Add New Post /wp-admin/post-new.php1,563 ▲3522.87 ▼0.28643.16 ▼22.9152.00 ▼1.37
Media Library /wp-admin/upload.php1,439 ▲424.23 ▲0.0496.70 ▼4.2640.89 ▼1.20
Help and Support /wp-admin/edit.php?post_type=slgf_slider&page=SLGF-help-page9032.0121.1441.03
Add Lightbox Gallery /wp-admin/post-new.php?post_type=slgf_slider3,1574.96123.9453.65
All Galleries /wp-admin/edit.php?post_type=slgf_slider1,1221.9331.0230.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=slgf_slider
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=slgf_slider 2285:0 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: lightbox, gallery builder, responsive gallery, masonry, image gallery...

simple-lightbox-gallery/simple-lightbox-gallery.php Passed 13 tests

The entry point to "Lightbox slider - Responsive Lightbox Gallery" version 1.9.7 is a PHP file that has certain tags in its header comment area
126 characters long description:
Lightbox slider plugin is allow users to view larger versions of images, simple slide shows and Gallery view with grid layout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected39,138 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PO File15,97317,25213,300
JavaScript141,1381,12510,698
SVG30128,954
CSS148811634,832
PHP41401211,354

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lightbox/lightgallery/images/next.png1.32KB1.58KB0.00%
images/Photos-icon.png1.56KB1.30KB▼ 16.67%
lightbox/lightgallery/images/close.png0.27KB0.29KB0.00%
lightbox/lightgallery/images/prev.png1.33KB1.59KB0.00%
images/Close-icon-new.png6.71KB7.58KB0.00%