67% joli-clear-lightbox

Code Review | Joli CLEAR Lightbox

WordPress plugin Joli CLEAR Lightbox scored67%from 54 tests.

About plugin

  • Plugin page: joli-clear-lightbox
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2020
  • Latest release: Mar 22, 2022
  • Number of updates: 6
  • Update frequency: every 126.7 days
  • Top authors: wpjoli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /742 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲4.74MB] [CPU: ▲19.89ms] Passed 4 tests

This is a short check of server-side resources used by Joli CLEAR Lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.50 ▲5.0461.87 ▲16.07
Dashboard /wp-admin8.52 ▲5.2269.38 ▲21.91
Posts /wp-admin/edit.php8.52 ▲5.1774.98 ▲28.13
Add New Post /wp-admin/post-new.php9.43 ▲3.55106.81 ▲13.44
Media Library /wp-admin/upload.php8.52 ▲5.3080.50 ▲45.96
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5256.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 215 new files
Database: no new tables, 13 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
joli_clear_lightbox_settings
joli_clear_lightbox_rating_time
joli_clear_lightbox_gopro_time
fs_active_plugins
fs_accounts
fs_gdpr
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Joli CLEAR Lightbox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.39 ▲0.111.45 ▼0.5429.21 ▼17.50
Dashboard /wp-admin2,235 ▲585.67 ▲0.0282.97 ▼26.2878.34 ▲31.50
Posts /wp-admin/edit.php2,141 ▲412.01 ▲0.0135.16 ▼4.0735.11 ▼1.74
Add New Post /wp-admin/post-new.php1,705 ▲17721.77 ▼1.17718.28 ▲13.0694.23 ▲18.45
Media Library /wp-admin/upload.php1,437 ▲374.17 ▼0.03104.16 ▲1.6193.16 ▲52.17
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0771.6723.8127.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/joli-clear-lightbox/includes/fs/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 11 options
    • db_upgraded
    • joli_clear_lightbox_settings
    • fs_accounts
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_gdpr
    • widget_recent-comments
    • fs_debug_mode
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 14× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/joli-clear-lightbox/core/Application.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Hooks.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Log.php
    • > /wp-content/plugins/joli-clear-lightbox/fs-helpers.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Controllers/MenuController.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Controllers/SettingsController.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Engine/CLEARLightbox.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Engine/ContentProcessing.php
    • > /wp-content/plugins/joli-clear-lightbox/core/Controllers/AdminController.php
    • > /wp-content/plugins/joli-clear-lightbox/helpers.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/admin/user-guide/hooks.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/config/defaults.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/notices/rating.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/joli-clear-lightbox/views/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/admin/user-guide/image-setup.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/notices/go-pro.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/admin/user-guide/quick-start.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/joli-clear-lightbox/views/admin/user-guide/gallery-setup.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/joli-clear-lightbox/views/admin/post_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/joli-clear-lightbox/views/admin/user-guide/user-guide.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

joli-clear-lightbox/joli-clear-lightbox.php 85% from 13 tests

Analyzing the main PHP file in "Joli CLEAR Lightbox" version 1.0.3
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 195 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected33,285 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1367,60416,60532,823
SVG352249
JavaScript63459197
CSS130016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity72.97
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,236
▷ Static methods17514.16%
▷ Public methods87070.39%
▷ Protected methods171.38%
▷ Private methods34928.24%
Functions115
▷ Named functions11297.39%
▷ Anonymous functions32.61%
Constants140
▷ Global constants9870.00%
▷ Class constants4230.00%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/public/img/wpjoli-logo-linear-small-bw-24px.png2.51KB1.92KB▼ 23.55%
includes/fs/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/admin/img/ambibackground-demo.png87.23KB35.92KB▼ 58.82%
assets/admin/img/wpjoli-logo-new-small.png8.27KB5.12KB▼ 38.12%
includes/fs/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%