78% lightbox-block

Code Review | LightBox Block

WordPress plugin LightBox Block scored78%from 54 tests.

About plugin

  • Plugin page: lightbox-block
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 62
  • Update frequency: every 6.5 days
  • Top authors: btechnologies (96.77%)abuhayat (4.84%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /10,658 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.35ms] Passed 4 tests

A check of server-side resources used by LightBox Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2036.77 ▼2.97
Dashboard /wp-admin3.60 ▲0.2950.15 ▼0.76
Posts /wp-admin/edit.php3.65 ▲0.2953.21 ▲3.70
Add New Post /wp-admin/post-new.php6.14 ▲0.2682.57 ▼12.75
Media Library /wp-admin/upload.php3.46 ▲0.2338.13 ▲3.08
Lightbox block /wp-admin/admin.php?page=lightbox-block3.4236.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 9 new options
New WordPress options
unique_id
widget_theysaidso_widget
-redirect
can_compress_scripts
db_upgraded
fs_accounts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for LightBox Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,645 ▼1,14212.32 ▼1.811.57 ▼0.2735.09 ▼12.02
Dashboard /wp-admin2,190 ▲135.11 ▼0.56114.96 ▲27.1146.17 ▲2.45
Posts /wp-admin/edit.php2,108 ▲52.57 ▲0.5766.03 ▲26.0734.07 ▼3.89
Add New Post /wp-admin/post-new.php1,708 ▲17921.54 ▼1.47723.08 ▲98.4742.00 ▼14.20
Media Library /wp-admin/upload.php1,401 ▼24.73 ▲0.50113.97 ▲12.6340.97 ▼5.37
Lightbox block /wp-admin/admin.php?page=lightbox-block9372.6550.7237.50

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • fs_accounts
    • unique_id
    • -redirect
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=lightbox-block
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/lightbox-block/bplugins_sdk/inc/Base/FSActivate.php+204
    Undefined index: thread
    • > GET request to /wp-admin/admin.php?page=lightbox-block
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/lightbox-block/bplugins_sdk/inc/Base/FSActivate.php+223
    Undefined index: type

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'FS_LITE' not found in wp-content/plugins/lightbox-block/bplugins_sdk/inc/Base/FSActivate.php:3
    • > PHP Warning
      Use of undefined constant LBB_PLUGIN_VERSION - assumed 'LBB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/lightbox-block/dist/editor.asset.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lightbox-block/inc/block.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Invalid version format
The official readme.txt might help

lightbox-block/index.php 85% from 13 tests

The main file in "LightBox Block" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lightbox-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,538 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP1116748904
JSON400327
PO File2126267283
SVG40012
CSS6076
JavaScript6046

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.43
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods35.00%
▷ Public methods5795.00%
▷ Protected methods00.00%
▷ Private methods35.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin