66% lightbox-with-ads

Code Review | Lightbox With Ads

WordPress plugin Lightbox With Ads scored66%from 54 tests.

About plugin

  • Plugin page: lightbox-with-ads
  • Plugin version: 1.0
  • PHP compatiblity: 7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2023
  • Latest release: Jan 10, 2023
  • Number of updates: 4
  • Update frequency: every 8.8 days
  • Top authors: wn24cz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /211 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.04MB] [CPU: ▼3.99ms] Passed 4 tests

Server-side resources used by Lightbox With Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0551.27 ▲8.84
Dashboard /wp-admin3.36 ▲0.0251.68 ▼5.41
Posts /wp-admin/edit.php3.48 ▲0.1249.75 ▲1.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.96 ▼16.12
Media Library /wp-admin/upload.php3.26 ▲0.0440.83 ▲3.74
Lightbox With Ads /wp-admin/options-general.php?page=lightbox_with_ads3.3635.49

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 25 new options
New WordPress options
lightbox_with_ads_option_plugin_type
lightbox_with_ads_option_license_type
lightbox_with_ads_option_logo_width
lightbox_with_ads_option_plugin_trial_end_date
lightbox_with_ads_option_background_color
lightbox_with_ads_option_close_button_font_size
db_upgraded
lightbox_with_ads_option_logo_height
lightbox_with_ads_option_license_status
lightbox_with_ads_option_current_img_index_color
...

Browser metrics Passed 4 tests

An overview of browser requirements for Lightbox With Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲26414.83 ▲0.466.54 ▲4.9842.57 ▲5.12
Dashboard /wp-admin2,337 ▲1566.19 ▲0.46103.51 ▲4.1936.97 ▼3.62
Posts /wp-admin/edit.php2,268 ▲1683.35 ▲1.3550.20 ▲11.8429.92 ▼4.30
Add New Post /wp-admin/post-new.php1,542 ▲1423.27 ▼0.03665.62 ▼8.2637.16 ▼13.74
Media Library /wp-admin/upload.php1,411 ▲174.22 ▼0.0184.85 ▼8.6245.92 ▲3.70
Lightbox With Ads /wp-admin/options-general.php?page=lightbox_with_ads1,3443.0141.4090.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options detected upon uninstall: 12 options
    • lightbox_with_ads_option_license_status
    • lightbox_with_ads_option_license_last_checked
    • lightbox_with_ads_option_license_type
    • db_upgraded
    • lightbox_with_ads_option_plugin_trial_end_date
    • lightbox_with_ads_option_plugin_type
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • lightbox_with_ads_option_license_expire_date
    • widget_recent-posts
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=lightbox_with_ads
    • > Notice in wp-content/plugins/lightbox-with-ads/php/admin_panel_settings.php+69
    Undefined variable: license_error
    • > GET request to /wp-admin/options-general.php?page=lightbox_with_ads
    • > Notice in wp-content/plugins/lightbox-with-ads/php/admin_panel_settings.php+76
    Undefined variable: license_success

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lightbox-with-ads/php/gallery_template.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lightbox-with-ads/php/admin_panel_settings.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=lightbox_with_ads
    • > Network (severe)
    wp-content/plugins/lightbox-with-ads/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: ad, ads, lightbox, images, gallery

lightbox-with-ads/lightbox_with_ads.php 77% from 13 tests

Analyzing the main PHP file in "Lightbox With Ads" version 1.0
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 249 characters long)
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "7")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lightbox-with-ads.php" instead of "lightbox_with_ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,118 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP48034675
CSS2172262
JavaScript33613181

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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