84% gallery-lightbox-slider

Code Review | Gallery Lightbox

WordPress plugin Gallery Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: gallery-lightbox-...
  • Plugin version: 1.0.0.39
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Aug 9, 2023
  • Number of updates: 128
  • Update frequency: every 22.8 days
  • Top authors: GhozyLab (100%)

Code review

54 tests

User reviews

97 reviews

Install metrics

10,000+ active /168,884 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.48ms] Passed 4 tests

A check of server-side resources used by Gallery Lightbox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.72 ▲4.22
Dashboard /wp-admin3.41 ▲0.0648.07 ▼11.25
Posts /wp-admin/edit.php3.52 ▲0.1746.66 ▲1.85
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.20 ▼22.57
Media Library /wp-admin/upload.php3.33 ▲0.1034.02 ▼1.93

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Gallery Lightbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,019 ▲27314.03 ▼0.5813.76 ▲12.1456.94 ▲16.97
Dashboard /wp-admin2,218 ▲294.86 ▼0.08125.37 ▲10.2241.88 ▼0.58
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0336.51 ▲3.5534.31 ▼1.31
Add New Post /wp-admin/post-new.php6,260 ▲4,74618.65 ▲1.03955.27 ▲274.7157.83 ▲0.95
Media Library /wp-admin/upload.php1,400 ▲94.19 ▼0.0096.32 ▼0.6746.28 ▲2.74

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Even though no errors were found, 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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gallery-lightbox-slider/gallery-lightbox-lite.php
    • > /wp-content/plugins/gallery-lightbox-slider/inc/gfg-metabox.php
    • > /wp-content/plugins/gallery-lightbox-slider/inc/functions/glg-functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 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: slider, gallery lightbox, photo gallery, free gallery, gallery...

gallery-lightbox-slider/gallery-lightbox-lite.php 92% from 13 tests

The principal PHP file in "Gallery Lightbox" v. 1.0.0.39 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gallery-lightbox-slider.php" instead of "gallery-lightbox-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected5,262 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS8277992,363
PO File94154551,300
JavaScript5262169923
PHP10310107676

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/glg-icon.png2.96KB0.27KB▼ 90.75%
inc/images/banners/next_level_banner.png56.49KB20.26KB▼ 64.15%
inc/images/info.png2.01KB1.62KB▼ 19.37%
inc/images/most_popular.png9.79KB2.77KB▼ 71.66%
inc/images/banners/emg_red_728x90.png49.14KB18.06KB▼ 63.24%