84% responsive-lightbox-lite

Code Review | Responsive Lightbox

WordPress plugin Responsive Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: responsive-lightb...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Jun 11, 2023
  • Number of updates: 53
  • Update frequency: every 61.4 days
  • Top authors: subhansanjaya (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

10,000+ active /179,632 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.24ms] Passed 4 tests

An overview of server-side resources used by Responsive Lightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.19 ▼1.97
Dashboard /wp-admin3.34 ▼0.0151.10 ▼9.09
Posts /wp-admin/edit.php3.39 ▲0.0345.47 ▼0.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.39 ▼1.35
Media Library /wp-admin/upload.php3.26 ▲0.0335.30 ▲0.06
Responsive Lightbox Lite /wp-admin/options-general.php?page=responsive-lightbox-lite3.2331.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
responsive_lightbox_lite_version
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17513.72 ▼0.656.48 ▲4.9037.74 ▼1.98
Dashboard /wp-admin2,212 ▲215.77 ▲0.86101.02 ▲0.2139.94 ▲1.59
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0135.18 ▼2.1333.17 ▼2.48
Add New Post /wp-admin/post-new.php1,542 ▲1818.21 ▼4.78610.83 ▼47.0249.30 ▼6.58
Media Library /wp-admin/upload.php1,394 ▲64.23 ▲0.0096.93 ▼5.8241.63 ▼1.99
Responsive Lightbox Lite /wp-admin/options-general.php?page=responsive-lightbox-lite9742.0828.9525.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • responsive_lightbox_lite_version
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/responsive-lightbox-lite/responsive-lightbox-lite.php:40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: Add an image for screenshot #1 (http://www.backraw.com/plugins/rll/images/screenshot-1.jpg)
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

responsive-lightbox-lite/responsive-lightbox-lite.php Passed 13 tests

The main PHP file in "Responsive Lightbox" ver. 1.3.4 adds more information about the plugin and also serves as the entry point for this plugin
124 characters long description:
This plugin offers a nice and elegant way to add Lightbox functionality for images, html content and media on your webpages.

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
Success! There were no dangerous files found in this plugin996 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP210940388
JavaScript36143324
CSS31623281
Markdown1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/nivo-lightbox/themes/default/prev@2x.png4.13KB0.99KB▼ 76.02%
assets/nivo-lightbox/themes/default/close@2x.png3.02KB0.34KB▼ 88.83%
assets/nivo-lightbox/themes/default/close.png2.88KB0.24KB▼ 91.76%
assets/images/pro.png11.33KB5.58KB▼ 50.75%
assets/nivo-lightbox/themes/default/prev.png3.11KB0.32KB▼ 89.67%