10% wp-lightbox-bank

Code Review | WordPress Lightbox Plugin by Lightbox Bank

WordPress plugin WordPress Lightbox Plugin by Lightbox Bank scored10%from 54 tests.

About plugin

  • Plugin page: wp-lightbox-bank
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 15, 2014
  • Latest release: Jun 20, 2017
  • Number of updates: 50
  • Update frequency: every 20.2 days
  • Top authors: contact-banker (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active /235,833 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/wp-lightbox-bank/lib/wp-lightbox-bank-install.php+23
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.05MB] [CPU: ▼12.19ms] 75% from 4 tests

This is a short check of server-side resources used by WordPress Lightbox Plugin by Lightbox Bank
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 652.62ms on /wp-admin/admin.php?page=wplb_recommendation)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.99 ▼4.01
Dashboard /wp-admin3.37 ▲0.0341.32 ▼18.58
Posts /wp-admin/edit.php3.49 ▲0.1349.78 ▲7.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.01 ▼26.38
Media Library /wp-admin/upload.php3.30 ▲0.0734.62 ▲0.23
System Status /wp-admin/admin.php?page=wplb_system_status3.39730.20
Display Settings /wp-admin/admin.php?page=wplb_display_settings3.2831.69
General Settings /wp-admin/admin.php?page=wp_lightbox_bank3.3032.98
Other Settings /wp-admin/admin.php?page=wplb_other_settings3.2732.21
Our Other Services /wp-admin/admin.php?page=wplb_other_services3.6731.06
Recommendations /wp-admin/admin.php?page=wplb_recommendation3.37652.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 100 new files
Database: 1 new table, 8 new options
New tables
wp_lightbox_bank_settings
New WordPress options
widget_recent-posts
widget_recent-comments
lightbox-remove-tables-uninstall
can_compress_scripts
lightbox-bank-pro-edition
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Lightbox Plugin by Lightbox Bank
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21814.10 ▼0.655.04 ▲3.1939.32 ▼3.86
Dashboard /wp-admin2,250 ▲595.92 ▲0.02100.64 ▼1.0371.72 ▲33.01
Posts /wp-admin/edit.php2,142 ▲532.20 ▲0.2036.98 ▼4.0835.44 ▲0.38
Add New Post /wp-admin/post-new.php1,556 ▲1923.42 ▲5.06674.41 ▲43.4955.63 ▲3.70
Media Library /wp-admin/upload.php1,441 ▲564.30 ▲0.08103.23 ▲3.1570.70 ▲28.75
System Status /wp-admin/admin.php?page=wplb_system_status1,3731.7828.7441.46
Display Settings /wp-admin/admin.php?page=wplb_display_settings9981.6728.3829.16
General Settings /wp-admin/admin.php?page=wp_lightbox_bank1,0661.7927.3138.40
Other Settings /wp-admin/admin.php?page=wplb_other_settings8791.8927.2726.88
Our Other Services /wp-admin/admin.php?page=wplb_other_services2,9281.7122.5629.45
Recommendations /wp-admin/admin.php?page=wplb_recommendation1,7381.7524.1832.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-lightbox-bank/views/wp-lightbox-bank-header.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

wp-lightbox-bank/wp-lightbox-bank.php Passed 13 tests

"WordPress Lightbox Plugin by Lightbox Bank" version 2.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
WP Lightbox Bank is the perfect responsive image lightbox for WordPress galleries.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin22,704 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PO File364,3205,83214,904
CSS4543773,154
PHP1571553,101
JavaScript220261,545

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/icon-succes.png0.52KB0.39KB▼ 24.95%
assets/images/icon.png3.32KB0.82KB▼ 75.23%