84% ultimate-lightbox

Code Review | Ultimate Lightbox

WordPress plugin Ultimate Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: ultimate-lightbox
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 89
  • Update frequency: every 29.6 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

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

Server metrics [RAM: ▲0.65MB] [CPU: ▲1.45ms] Passed 4 tests

Server-side resources used by Ultimate Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6443.48 ▼0.81
Dashboard /wp-admin4.00 ▲0.6952.68 ▼0.76
Posts /wp-admin/edit.php4.05 ▲0.6955.05 ▲8.69
Add New Post /wp-admin/post-new.php6.53 ▲0.6490.44 ▼1.31
Media Library /wp-admin/upload.php3.86 ▲0.6347.25 ▲14.01
Lightbox /wp-admin/admin.php?page=ulb-settings3.9240.68
Ultimate Lightbox - Welcome! /wp-admin/index.php?page=ulb-getting-started3.8237.68
About Us /wp-admin/admin.php?page=ewd-ulb-about-us3.8235.55

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 236 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
ulb-permission-level
widget_recent-posts
db_upgraded
ulb-installation-time
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8114.29 ▼0.321.84 ▲0.2236.84 ▼10.68
Dashboard /wp-admin2,220 ▲455.63 ▼0.0991.35 ▼12.9041.63 ▼2.59
Posts /wp-admin/edit.php2,125 ▲251.97 ▲0.0239.45 ▲2.7335.78 ▼1.30
Add New Post /wp-admin/post-new.php1,706 ▲17621.94 ▼1.36594.03 ▼128.3546.50 ▼10.41
Media Library /wp-admin/upload.php1,466 ▲668.78 ▲4.58204.83 ▲104.0639.94 ▼3.49
Lightbox /wp-admin/admin.php?page=ulb-settings1,3693.3353.4032.58
Ultimate Lightbox - Welcome! /wp-admin/index.php?page=ulb-getting-started1,4082.1223.5932.25
About Us /wp-admin/admin.php?page=ewd-ulb-about-us8941.6625.6423.27

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • ulb-installation-time
    • ulb-permission-level
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.SelectMenu.class.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPage_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPage.Submenu.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.Password.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-lightbox/lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in ultimate-lightbox/assets to your readme.txt
Please take inspiration from this readme.txt

ultimate-lightbox/ultimate-lightbox.php Passed 13 tests

This is the main PHP file of "Ultimate Lightbox" version 1.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
A plugin that lets you add a lightbox to images on your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected12,453 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript749845494,195
PHP441,2691,5204,106
CSS203212383,569
Markdown31260336
SVG12110247

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.57
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes12.38%
▷ Concrete classes4197.62%
▷ Final classes00.00%
Methods171
▷ Static methods31.75%
▷ Public methods15288.89%
▷ Protected methods42.34%
▷ Private methods158.77%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
27 PNG files occupy 1.09MB with 0.72MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ewd-support-icon-documentation.png2.13KB0.73KB▼ 65.63%
assets/img/dash-asset-stars.png43.07KB14.24KB▼ 66.93%
assets/img/Icon_Documentation_Grey.png21.20KB6.73KB▼ 68.26%
assets/img/ewd-ulb-icon.png186.84KB60.88KB▼ 67.41%
lib/simple-admin-pages/img/options-asset-star.png0.78KB0.32KB▼ 58.92%