94% easy-lightbox-wp

Code Review | Easy Lightbox - Best Image, Gallery and Video Lightbox for WordPress

WordPress plugin Easy Lightbox - Best Image, Gallery and Video Lightbox for WordPress scored 94% from 54 tests.

About plugin

  • Plugin page: easy-lightbox-wp
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Aug 2, 2014
  • Latest release: Jul 23, 2021
  • Number of updates: 14
  • Update frequency: every 182.0 days
  • Top authors: shapedplugin (64.29%)lazypersons (42.86%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 20,025 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼144.51ms] Passed 4 tests

Analyzing server-side resources used by Easy Lightbox - Best Image, Gallery and Video Lightbox for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.80 ▲13.00
Dashboard /wp-admin3.06 ▲0.0141.19 ▼12.66
Posts /wp-admin/edit.php3.11 ▲0.0047.25 ▲1.70
Add New Post /wp-admin/post-new.php5.42 ▼0.0288.71 ▼566.58
Media Library /wp-admin/upload.php3.00 ▲0.0036.02 ▼0.50

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Lightbox - Best Image, Gallery and Video Lightbox for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲24716.35 ▲0.6718.70 ▼6.0350.27 ▼0.85
Dashboard /wp-admin2,970 ▲365.91 ▼0.14154.42 ▲2.50108.22 ▼2.24
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0266.23 ▲1.1286.15 ▲4.03
Add New Post /wp-admin/post-new.php1,683 ▼1,95118.79 ▲3.84419.12 ▼81.44110.84 ▲3.68
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.06159.13 ▲4.42117.85 ▲6.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-lightbox-wp/plugin-main.php:15

User-side errors Passed 1 test

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: popup, video lightbox, jquery lightbox, lightbox, popup video

easy-lightbox-wp/plugin-main.php 92% from 13 tests

The main PHP file in "Easy Lightbox - Best Image, Gallery and Video Lightbox for WordPress" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-lightbox-wp.php" instead of "plugin-main.php")

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
Good job! No executable or dangerous file extensions detected26 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.15MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/litebox-close.png52.50KB1.11KB▼ 97.89%
imgs/litebox-next.png51.79KB0.54KB▼ 98.95%
imgs/litebox-prev.png51.08KB0.54KB▼ 98.94%