73% everlightbox

Code Review | Lightbox - EverlightBox Gallery

WordPress plugin Lightbox - EverlightBox Gallery scored 73% from 54 tests.

About plugin

  • Plugin page: everlightbox
  • Plugin version: 1.1.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 5.9.2
  • First release: Sep 13, 2016
  • Latest release: Mar 8, 2022
  • Number of updates: 85
  • Update frequency: every 23.6 days
  • Top authors: GreenTreeLabs (82.35%)giucu91 (11.76%)raldea89 (4.71%)machothemes (3.53%)wpchill (2.35%)

Code review

54 tests

User reviews

37 reviews

Install metrics

2,000+ active / 49,143 total downloads

Benchmarks

Plugin footprint 65% 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.53MB] [CPU: ▼326.57ms] Passed 4 tests

An overview of server-side resources used by Lightbox - EverlightBox Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.5655.52 ▼1.91
Dashboard /wp-admin3.96 ▲0.5535.66 ▼5.46
Posts /wp-admin/edit.php4.19 ▲0.5543.34 ▲5.37
Add New Post /wp-admin/post-new.php7.43 ▲0.46109.54 ▼1,297.55
Media Library /wp-admin/upload.php3.91 ▲0.6231.67 ▼1.35
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius4.2624.82

Server storage [IO: ▲6.63MB] [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: 597 new files
Database: no new tables, 5 new options
New WordPress options
fs_accounts
everlightbox_options
fs_gdpr
fs_active_plugins
fs_debug_mode

Browser metrics Passed 4 tests

Lightbox - EverlightBox Gallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,969 ▲22316.34 ▲0.5611.04 ▲4.8117.36 ▲15.16
Dashboard /wp-admin2,940 ▲866.17 ▲0.03119.66 ▼68.77221.24 ▲26.22
Posts /wp-admin/edit.php2,751 ▲603.15 ▼0.0874.27 ▲1.26170.22 ▲5.11
Add New Post /wp-admin/post-new.php1,699 ▲6416.63 ▼3.62453.85 ▼19.47186.50 ▼13.64
Media Library /wp-admin/upload.php1,758 ▲635.63 ▲0.14139.08 ▼71.25300.70 ▼2.60
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4892.7055.47113.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/everlightbox/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_debug_mode
    • fs_accounts
    • everlightbox_options
    • fs_active_plugins
    • fs_gdpr

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)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 45× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/everlightbox/includes-premium/everlightbox-facebook-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/everlightbox/admin/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/everlightbox/admin/cmb2/includes/helper-functions.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/everlightbox/admin/partials/welcome.php:126

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
10 plugin tags: social, video gallery, video, social sharing, gallery...

everlightbox/everlightbox.php Passed 13 tests

The entry point to "Lightbox - EverlightBox Gallery" version 1.1.18 is a PHP file that has certain tags in its header comment area
40 characters long description:
Light and stylish lightbox for WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin80,380 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP1769,50322,28937,899
PO File12214,52118,76032,812
CSS291,2131,1685,623
JavaScript176165792,566
Sass16300251,378
SVG831102

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity43.46
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes123
▷ Abstract classes108.13%
▷ Concrete classes11391.87%
▷ Final classes00.00%
Methods1,709
▷ Static methods26115.27%
▷ Public methods1,26974.25%
▷ Protected methods1046.09%
▷ Private methods33619.66%
Functions118
▷ Named functions11799.15%
▷ Anonymous functions10.85%
Constants139
▷ Global constants10877.70%
▷ Class constants3122.30%
▷ Public constants31100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
41 PNG files occupy 0.63MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/patterns-premium/3-min.png0.10KB0.10KB0.00%
(invalid) admin/images/mac.png95.22KB0.00KB▼ 100.00%
admin/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
admin/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
public/patterns-premium/13-min.png0.12KB0.12KB0.00%