84% gg-lightbox

Code Review | Gutenberg Gallery Blocks Lightbox

WordPress plugin Gutenberg Gallery Blocks Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: gg-lightbox
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2021
  • Latest release: Nov 10, 2022
  • Number of updates: 7
  • Update frequency: every 96.0 days
  • Top authors: EmpireOfLight (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /4,617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.08ms] Passed 4 tests

An overview of server-side resources used by Gutenberg Gallery Blocks Lightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.50 ▲1.92
Dashboard /wp-admin3.31 ▲0.0146.41 ▼10.22
Posts /wp-admin/edit.php3.36 ▲0.0045.42 ▲2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.70 ▼2.29
Media Library /wp-admin/upload.php3.23 ▲0.0035.42 ▲2.28

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gutenberg Gallery Blocks Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.55 ▼1.078.70 ▲7.0443.08 ▲2.75
Dashboard /wp-admin2,195 ▲155.55 ▼0.0681.82 ▼8.1139.89 ▼0.70
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0434.26 ▼0.2233.70 ▼6.66
Add New Post /wp-admin/post-new.php1,535 ▲718.40 ▼4.62596.29 ▼72.4572.06 ▲19.12
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.0392.73 ▼8.9141.09 ▼2.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gg-lightbox/ggbl-lightbox.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: gutenberg gallery block, images, slider, gallery, lightbox...

gg-lightbox/ggbl-lightbox.php 92% from 13 tests

The main file in "Gutenberg Gallery Blocks Lightbox" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gg-lightbox.php" instead of "ggbl-lightbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin211 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1180106
JavaScript192693
PHP161412

PHP code Passed 2 tests

An short overview of 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.00
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin