78% simple-lightbox-fslight

Code Review | Simple Lightbox for WordPress

WordPress plugin Simple Lightbox for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: simple-lightbox-f...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 57
  • Update frequency: every 9.8 days
  • Top authors: martinvonberg (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /2,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.18ms] Passed 4 tests

An overview of server-side resources used by Simple Lightbox for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4239.07 ▼2.04
Dashboard /wp-admin3.42 ▲0.1146.44 ▼1.18
Posts /wp-admin/edit.php3.53 ▲0.1750.47 ▲2.61
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.36 ▼14.72
Media Library /wp-admin/upload.php3.34 ▲0.1132.85 ▼2.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Lightbox for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.38 ▲0.221.67 ▼0.0338.70 ▼6.02
Dashboard /wp-admin2,198 ▲215.51 ▼0.1585.05 ▼8.7039.46 ▼0.44
Posts /wp-admin/edit.php2,097 ▼01.95 ▼0.1440.72 ▲1.3834.81 ▼5.48
Add New Post /wp-admin/post-new.php1,526 ▼323.07 ▼0.31596.74 ▼72.8156.08 ▼0.58
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.05100.35 ▼8.6041.67 ▼3.71

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-lightbox-fslight/admin/pre-post-install.php
    • > /wp-content/plugins/simple-lightbox-fslight/simple-lightbox-fslight.php
    • > /wp-content/plugins/simple-lightbox-fslight/classes/RewriteFigureTagsClass.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'IvoPetkov\\HTML5DOMDocument\\Internal\\QuerySelectors' not found in wp-content/plugins/simple-lightbox-fslight/classes/html5-dom-document-php/src/HTML5DOMDocument.php on line 21
    • > PHP Fatal error
      Trait 'IvoPetkov\\HTML5DOMDocument\\Internal\\QuerySelectors' not found in wp-content/plugins/simple-lightbox-fslight/classes/html5-dom-document-php/src/HTML5DOMElement.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: lightbox, video, gallery, image, youtube...

simple-lightbox-fslight/simple-lightbox-fslight.php 92% from 13 tests

The primary PHP file in "Simple Lightbox for WordPress" version 2.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

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
Everything looks great! No dangerous files found in this plugin2,063 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP92776571,862
JSON400183
CSS11016
JavaScript2002

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.54
Average class complexity60.57
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity5.06
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces3
Interfaces1
Traits1
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods57
▷ Static methods00.00%
▷ Public methods4171.93%
▷ Protected methods00.00%
▷ Private methods1628.07%
Functions38
▷ Named functions615.79%
▷ Anonymous functions3284.21%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/icon-fullscreen-white.png0.20KB0.20KB▼ 2.90%