78% ari-fancy-lightbox

Code Review | ARI Fancy Lightbox - WordPress Popup

WordPress plugin ARI Fancy Lightbox - WordPress Popup scored78%from 54 tests.

About plugin

  • Plugin page: ari-fancy-lightbox
  • Plugin version: 1.3.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2017
  • Latest release: Oct 22, 2023
  • Number of updates: 106
  • Update frequency: every 23.2 days
  • Top authors: arisoft (100%)

Code review

54 tests

User reviews

65 reviews

Install metrics

10,000+ active /166,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.53ms] Passed 4 tests

Analyzing server-side resources used by ARI Fancy Lightbox - WordPress Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2138.13 ▲1.64
Dashboard /wp-admin3.49 ▲0.1550.96 ▼5.66
Posts /wp-admin/edit.php3.60 ▲0.2549.27 ▲3.80
Add New Post /wp-admin/post-new.php6.09 ▲0.2192.15 ▲2.42
Media Library /wp-admin/upload.php3.41 ▲0.1940.67 ▲3.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ARI Fancy Lightbox - WordPress Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13513.89 ▼0.4815.34 ▲13.8137.77 ▼1.27
Dashboard /wp-admin2,211 ▲335.59 ▼0.0286.40 ▼28.2238.56 ▼7.50
Posts /wp-admin/edit.php2,116 ▲131.99 ▼0.0438.92 ▲0.7636.60 ▲4.00
Add New Post /wp-admin/post-new.php1,550 ▲1018.24 ▲0.01619.63 ▼54.8870.78 ▲13.48
Media Library /wp-admin/upload.php1,410 ▲74.24 ▲0.0796.36 ▼2.4542.24 ▼3.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • ari_fancy_lightbox
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • ari_fancy_lightbox_settings
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ari-fancy-lightbox/loader.php
    • > /wp-content/plugins/ari-fancy-lightbox/ari-fancy-lightbox.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Models\\Model' not found in wp-content/plugins/ari-fancy-lightbox/includes/models/class-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Controllers\\Display' not found in wp-content/plugins/ari-fancy-lightbox/includes/controllers/settings/class-display.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\App\\Installer' not found in wp-content/plugins/ari-fancy-lightbox/includes/class-installer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Forms\\Field' not found in wp-content/plugins/ari-fancy-lightbox/libraries/arisoft/core/forms/fields/class-checkbox-group.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\App\\Plugin' not found in wp-content/plugins/ari-fancy-lightbox/includes/class-plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Forms\\Form' not found in wp-content/plugins/ari-fancy-lightbox/includes/forms/class-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Views\\View' not found in wp-content/plugins/ari-fancy-lightbox/includes/views/class-base.php:7
    • > PHP Warning
      Use of undefined constant ARIFANCYLIGHTBOX_URL - assumed 'ARIFANCYLIGHTBOX_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ari-fancy-lightbox/includes/defines.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Utils\\Options' not found in wp-content/plugins/ari-fancy-lightbox/libraries/arisoft/core/controllers/class-controller-options.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ari-fancy-lightbox/includes/views/settings/tmpl/default.php on line 2

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can look at the official readme.txt

ari-fancy-lightbox/ari-fancy-lightbox.php Passed 13 tests

"ARI Fancy Lightbox - WordPress Popup" version 1.3.13's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
Full-featured lightbox plugin for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected6,009 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP631,242163,277
CSS4297432,149
HTML14716330
SVG900150
JavaScript1019118103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.09
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces16
Interfaces0
Traits0
Classes56
▷ Abstract classes11.79%
▷ Concrete classes5598.21%
▷ Final classes11.82%
Methods197
▷ Static methods4020.30%
▷ Public methods14674.11%
▷ Protected methods3919.80%
▷ Private methods126.09%
Functions29
▷ Named functions413.79%
▷ Anonymous functions2586.21%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
92 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png0.29KB0.36KB0.00%
assets/pdfjs/web/images/findbarButton-previous.png0.19KB0.31KB0.00%
assets/pdfjs/web/images/treeitem-collapsed-rtl@2x.png0.16KB0.21KB0.00%
assets/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png0.61KB0.72KB0.00%
assets/pdfjs/web/images/toolbarButton-viewOutline@2x.png0.32KB0.49KB0.00%