83% lightbox-popup

Code Review | Image and Video Lightbox, Image PopUp

WordPress plugin Image and Video Lightbox, Image PopUp scored83%from 54 tests.

About plugin

  • Plugin page: lightbox-popup
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Mar 31, 2023
  • Number of updates: 390
  • Update frequency: every 6.8 days
  • Top authors: wpdevart (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /179,928 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.26MB] [CPU: ▼6.80ms] Passed 4 tests

This is a short check of server-side resources used by Image and Video Lightbox, Image PopUp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2637.33 ▼5.82
Dashboard /wp-admin3.57 ▲0.2744.82 ▲0.86
Posts /wp-admin/edit.php3.68 ▲0.3346.67 ▼2.20
Add New Post /wp-admin/post-new.php6.15 ▲0.2682.62 ▼20.02
Media Library /wp-admin/upload.php3.49 ▲0.2635.10 ▲1.59
Lightbox /wp-admin/admin.php?page=wpdevart_lightbox3.5037.76
Hire an Expert /wp-admin/admin.php?page=wpdevart-lightbox-hire-expert3.4631.40
Featured Plugins /wp-admin/admin.php?page=wpdevart-lightbox-featured-plugins3.4629.80

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 90 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Image and Video Lightbox, Image PopUp: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,069 ▲30813.50 ▼1.0910.85 ▲9.2941.43 ▲1.59
Dashboard /wp-admin2,234 ▲605.51 ▼0.0584.67 ▼4.1877.74 ▲36.11
Posts /wp-admin/edit.php2,133 ▲331.99 ▲0.0436.49 ▼5.4532.52 ▼3.94
Add New Post /wp-admin/post-new.php1,710 ▲18122.11 ▼1.09672.28 ▲28.2766.79 ▲17.98
Media Library /wp-admin/upload.php1,433 ▲334.20 ▲0.0694.09 ▼9.9769.45 ▲27.10
Lightbox /wp-admin/admin.php?page=wpdevart_lightbox5,1595.2493.38127.98
Hire an Expert /wp-admin/admin.php?page=wpdevart-lightbox-hire-expert8871.9921.5229.30
Featured Plugins /wp-admin/admin.php?page=wpdevart-lightbox-featured-plugins1,1151.9822.5132.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/lightbox-popup/wpdevart_lightbox.php:11

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt might help

lightbox-popup/wpdevart_lightbox.php 85% from 13 tests

The entry point to "Image and Video Lightbox, Image PopUp" version 2.1.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lightbox-popup.php" instead of "wpdevart_lightbox.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 229 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 plugin5,841 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS62641132,703
PHP5220571,982
JavaScript2202951,156

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.80
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods718.92%
▷ Public methods2670.27%
▷ Protected methods00.00%
▷ Private methods1129.73%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
72 PNG files occupy 0.63MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/contorl_buttons/next_content.png15.40KB0.21KB▼ 98.66%
images/contorl_buttons/download_hover.png15.14KB0.48KB▼ 96.84%
images/message.png2.21KB1.34KB▼ 39.68%
images/hire_expert/7.png1.38KB0.89KB▼ 35.76%
images/ui-bg_diagonals-thick_20_666666_40x40.png0.34KB0.15KB▼ 55.27%