10% ewsel-lightbox-for-galleries

Code Review | EWSEL Lightbox For Galleries

WordPress plugin EWSEL Lightbox For Galleries scored10%from 54 tests.

About plugin

  • Plugin page: ewsel-lightbox-fo...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.5
  • WordPress version: 6.3.1
  • First release: Aug 12, 2012
  • Latest release: Jun 11, 2014
  • Number of updates: 19
  • Update frequency: every 35.4 days
  • Top authors: mwteam (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /16,297 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/ewsel-lightbox-for-galleries/LightboxForGalleries.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; LightboxForGalleries has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.67ms] Passed 4 tests

This is a short check of server-side resources used by EWSEL Lightbox For Galleries
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.42 ▼37.77
Dashboard /wp-admin2.10 ▼1.205.51 ▼42.52
Posts /wp-admin/edit.php2.11 ▼1.257.14 ▼41.07
Add New Post /wp-admin/post-new.php2.10 ▼3.786.17 ▼101.33
Media Library /wp-admin/upload.php2.10 ▼1.125.00 ▼27.39
EWSEL Lightbox /wp-admin/options-general.php?page=ewsel-jquery-lightbox2.116.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EWSEL Lightbox For Galleries
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17513.59 ▼0.617.10 ▲5.2441.38 ▼2.61
Dashboard /wp-admin2,210 ▲214.85 ▼0.08107.00 ▼14.0539.00 ▼7.72
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0239.94 ▲4.6934.18 ▼0.12
Add New Post /wp-admin/post-new.php1,517 ▲317.77 ▲0.26668.63 ▼0.1858.59 ▼7.08
Media Library /wp-admin/upload.php1,395 ▲74.18 ▲0.0296.88 ▼7.3444.79 ▲0.31
EWSEL Lightbox /wp-admin/options-general.php?page=ewsel-jquery-lightbox8442.0324.5127.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ewsel-lightbox-for-galleries/LightboxForGalleries.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; LightboxForGalleries has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ewsel-jquery-lightbox
    • > Deprecated in wp-content/plugins/ewsel-lightbox-for-galleries/LightboxForGalleries.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; LightboxForGalleries has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=ewsel-jquery-lightbox
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ewsel-jquery-lightbox
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ewsel-lightbox-for-galleries/LightboxForGalleries.php:170

User-side errors Passed 1 test

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

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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (ColorBox Theme 1), #2 (ColorBox Theme 2), #3 (ColorBox Theme 3), #4 (ColorBox Theme 4), #5 (ColorBox Theme 5)
You can look at the official readme.txt

ewsel-lightbox-for-galleries/LightboxForGalleries.php 85% from 13 tests

"EWSEL Lightbox For Galleries" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ewsel-lightbox-for-galleries.php" instead of "LightboxForGalleries.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected855 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript206461
CSS823122279
PHP13724115

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
50 compressed PNG files occupy 1.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
colorbox/theme8/images/controls.png0.56KB0.57KB0.00%
colorbox/theme5/images/border.png0.16KB0.16KB0.00%
colorbox/theme1/images/internet_explorer/borderMiddleRight.png0.11KB0.10KB▼ 7.41%
colorbox/theme1/images/internet_explorer/borderBottomLeft.png0.21KB0.20KB▼ 4.19%
colorbox/theme8/images/ie6/borderTopCenter.png0.14KB0.18KB0.00%