83% kodefix-lightbox-gallery

Code Review | Lightbox Gallery by Kodefix - Responsive Lightbox Effect for gallery block

WordPress plugin Lightbox Gallery by Kodefix - Responsive Lightbox Effect for gallery block scored83%from 54 tests.

About plugin

  • Plugin page: kodefix-lightbox-...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: Jul 30, 2021
  • Number of updates: 5
  • Update frequency: every 85.8 days
  • Top authors: gkubiszyn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.18ms] Passed 4 tests

This is a short check of server-side resources used by Lightbox Gallery by Kodefix - Responsive Lightbox Effect for gallery block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4050.47 ▲10.99
Dashboard /wp-admin3.31 ▲0.0151.15 ▼1.24
Posts /wp-admin/edit.php3.36 ▲0.0050.22 ▲1.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.72 ▼18.29
Media Library /wp-admin/upload.php3.23 ▲0.0044.30 ▲9.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Lightbox Gallery by Kodefix - Responsive Lightbox Effect for gallery block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.74 ▲0.293.36 ▲1.5745.03 ▲3.62
Dashboard /wp-admin2,198 ▲185.57 ▼0.1194.75 ▲3.6342.27 ▲2.28
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0635.62 ▼0.5134.78 ▼1.59
Add New Post /wp-admin/post-new.php1,531 ▲323.29 ▲0.35686.55 ▲72.1554.61 ▲7.13
Media Library /wp-admin/upload.php1,403 ▲64.23 ▼0.01100.46 ▼13.0043.58 ▼0.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'IvoPetkov\\HTML5DOMDocument\\Internal\\QuerySelectors' not found in wp-content/plugins/kodefix-lightbox-gallery/vendor/ivopetkov/html5-dom-document-php/src/HTML5DOMDocument.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kodefix-lightbox-gallery/lightbox-gallery-by-kodefix.php:29
    • > PHP Fatal error
      Trait 'IvoPetkov\\HTML5DOMDocument\\Internal\\QuerySelectors' not found in wp-content/plugins/kodefix-lightbox-gallery/vendor/ivopetkov/html5-dom-document-php/src/HTML5DOMElement.php on line 19

User-side errors Passed 1 test

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

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
These attributes need your attention:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

kodefix-lightbox-gallery/lightbox-gallery-by-kodefix.php 77% from 13 tests

"Lightbox Gallery by Kodefix - Responsive Lightbox Effect for gallery block" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 74 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("kodefix-lightbox-gallery.php" instead of "lightbox-gallery-by-kodefix.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,809 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP152365371,734
JSON30074
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity47.62
▷ Minimum class complexity1.00
▷ Maximum class complexity144.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods64
▷ Static methods34.69%
▷ Public methods5585.94%
▷ Protected methods00.00%
▷ Private methods914.06%
Functions36
▷ Named functions411.11%
▷ Anonymous functions3288.89%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
There are no PNG files in this plugin