10% easy-lightbox-2-automated

Code Review | Easy Lightbox 2 Automated

WordPress plugin Easy Lightbox 2 Automated scored10%from 54 tests.

About plugin

  • Plugin page: easy-lightbox-2-a...
  • Plugin version: 3.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.5-5.7
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Jul 4, 2021
  • Number of updates: 17
  • Update frequency: every 46.9 days
  • Top authors: desbest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,714 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/easy-lightbox-2-automated/lightbox2.php+23
    Undefined variable: wp_version

Server metrics [RAM: ▼1.25MB] [CPU: ▼44.00ms] Passed 4 tests

A check of server-side resources used by Easy Lightbox 2 Automated
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.08 ▼38.10
Dashboard /wp-admin3.00 ▼0.3422.44 ▼38.96
Posts /wp-admin/edit.php3.00 ▼0.3524.51 ▼23.81
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.52 ▼75.11
Media Library /wp-admin/upload.php3.00 ▼0.2324.30 ▼9.77
Easy Lightbox 2 Automated /wp-admin/options-general.php?page=easy-lightbox-2-automated/options.php3.0029.08

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 10 new options
New WordPress options
lightbox_2_automate
lightbox_2_theme_path
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
lightbox_2_resize_on_demand
lightbox_2_theme
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Lightbox 2 Automated
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲24314.62 ▲0.2813.23 ▲10.6442.36 ▼9.32
Dashboard /wp-admin2,199 ▲225.53 ▼0.1587.40 ▼8.4943.01 ▲2.46
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.1440.48 ▲4.3236.85 ▲2.61
Add New Post /wp-admin/post-new.php1,539 ▲1318.25 ▼4.61629.33 ▼64.3061.91 ▼0.43
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.01104.30 ▼1.1543.37 ▼2.64
Easy Lightbox 2 Automated /wp-admin/options-general.php?page=easy-lightbox-2-automated/options.php8712.0325.9931.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • lightbox_2_automate
    • lightbox_2_resize_on_demand
    • lightbox_2_theme
    • can_compress_scripts
    • db_upgraded
    • lightbox_2_theme_path
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-lightbox-2-automated/options.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=easy-lightbox-2-automated/options.php
    • > Notice in wp-content/plugins/easy-lightbox-2-automated/options.php+8
    Undefined index: stage

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

easy-lightbox-2-automated/lightbox2.php 85% from 13 tests

Analyzing the main PHP file in "Easy Lightbox 2 Automated" version 3.1
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 396 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-lightbox-2-automated.php" instead of "lightbox2.php")

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
Success! There were no dangerous files found in this plugin1,297 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript226171888
CSS4360284
PHP22235125

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.37
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin