78% wp-responsive-lightbox

Code Review | WP Responsive Lightbox

WordPress plugin WP Responsive Lightbox scored78%from 54 tests.

About plugin

  • Plugin page: wp-responsive-lig...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2016
  • Latest release: Aug 31, 2016
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: daddydesign (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /4,214 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.63ms] Passed 4 tests

This is a short check of server-side resources used by WP Responsive Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.57 ▲0.10
Dashboard /wp-admin3.36 ▲0.0147.99 ▼14.72
Posts /wp-admin/edit.php3.47 ▲0.1147.69 ▼5.00
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.65 ▼9.46
Media Library /wp-admin/upload.php3.28 ▲0.0535.11 ▼1.35
Responsive Lightbox /wp-admin/options-general.php?page=dd_lightbox_ads3.2831.98

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 10 new options
New WordPress options
dd_lightbox_ads_width
widget_theysaidso_widget
widget_recent-comments
dd_lightbox_ads_visiblity
dd_lightbox_ads_delay
dd_lightbox_ads_display_type
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Responsive Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5014.21 ▼0.052.08 ▲0.3442.09 ▲1.22
Dashboard /wp-admin2,201 ▲245.62 ▲0.0984.12 ▼6.4638.30 ▼0.97
Posts /wp-admin/edit.php2,109 ▲62.03 ▲0.0433.75 ▼9.0534.20 ▼9.03
Add New Post /wp-admin/post-new.php1,539 ▲1317.91 ▼5.74596.15 ▼80.9668.06 ▲13.29
Media Library /wp-admin/upload.php1,406 ▲94.18 ▲0.0295.40 ▼27.7045.68 ▼1.42
Responsive Lightbox /wp-admin/options-general.php?page=dd_lightbox_ads7131.7421.3621.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=dd_lightbox_ads
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/wp-responsive-lightbox/views/admin/index.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/wp-responsive-lightbox/views/admin/index.php(5): do_settings_fields()
    #1 wp-content/plugins/wp-responsive-lightbox/wp-responsive-lightbox.php(171): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): dd_lightbox_ads->dd_lighbox_controller()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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 items
  • 3× 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/wp-responsive-lightbox/wp-responsive-lightbox.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-responsive-lightbox/views/admin/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-responsive-lightbox/lightbox.php:2

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Bodega AD), #2 (Red Ginger Pop-Up), #3 (Radio Bar Call of Action), #4 (Settings Page)
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "WP Responsive Lightbox" version 1.1
57 characters long description:
Display a Responsive Lightbox withs ads on specific pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin423 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP58834338
CSS13045
JavaScript1121229
SVG10111

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin