94% acclectic-lightbox

Code Review | Acclectic Lightbox

WordPress plugin Acclectic Lightbox scored 94% from 54 tests.

About plugin

  • Plugin page: acclectic-lightbox
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.1
  • WordPress version: 5.9.2
  • First release: Mar 13, 2021
  • Latest release: Oct 13, 2021
  • Number of updates: 37
  • Update frequency: every 5.8 days
  • Top authors: acclectic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 440 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼297.11ms] Passed 4 tests

A check of server-side resources used by Acclectic Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0292.02 ▲34.57
Dashboard /wp-admin3.41 ▲0.0134.90 ▲1.48
Posts /wp-admin/edit.php3.65 ▲0.0143.49 ▲3.19
Add New Post /wp-admin/post-new.php6.89 ▼0.08100.03 ▼1,191.86
Media Library /wp-admin/upload.php3.30 ▲0.0125.74 ▼1.23

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Acclectic Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,010 ▲28818.57 ▲2.8722.53 ▲16.852.69 ▲0.41
Dashboard /wp-admin2,881 ▲206.09 ▼0.11119.93 ▼37.18212.54 ▲51.77
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0163.53 ▼1.78146.87 ▼51.45
Add New Post /wp-admin/post-new.php1,754 ▲4321.50 ▲0.69453.29 ▼26.36184.75 ▲11.36
Media Library /wp-admin/upload.php1,695 ▼35.51 ▲0.03150.92 ▲12.63236.74 ▲41.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AcclecticLightbox\\Controller' not found in wp-content/plugins/acclectic-lightbox/inc/plugin.php:21
    • > PHP Warning
      include_once(): Failed opening 'ACCLECTIC_LIGHTBOX_PATHinc/strings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 17
    • > PHP Warning
      include_once(ACCLECTIC_LIGHTBOX_PATHinc/strings.php): failed to open stream: No such file or directory in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 17
    • > PHP Warning
      include_once(): Failed opening 'ACCLECTIC_LIGHTBOX_PATHinc/controller.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 18
    • > PHP Warning
      Use of undefined constant ACCLECTIC_LIGHTBOX_PATH - assumed 'ACCLECTIC_LIGHTBOX_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 17
    • > PHP Warning
      Use of undefined constant ACCLECTIC_LIGHTBOX_PATH - assumed 'ACCLECTIC_LIGHTBOX_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 18
    • > PHP Warning
      include_once(ACCLECTIC_LIGHTBOX_PATHinc/controller.php): failed to open stream: No such file or directory in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

acclectic-lightbox/acclectic-lightbox.php Passed 13 tests

The main file in "Acclectic Lightbox" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
105 characters long description:
An EXIF-enabled lightbox that works with native Wordpress images and galleries, with GPS mapping support.

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
Success! There were no dangerous files found in this plugin3,344 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52852551,247
PO File10450440960
Markdown51470505
CSS16927446
PHP43423176
SVG100010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin