84% acclectic-lightbox

Code Review | Acclectic Lightbox

WordPress plugin Acclectic Lightbox scored84%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: 6.3.1
  • 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 /843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.79ms] Passed 4 tests

An overview of server-side resources used by Acclectic Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.12 ▼7.56
Dashboard /wp-admin3.37 ▲0.0745.31 ▼8.60
Posts /wp-admin/edit.php3.42 ▲0.0748.24 ▲2.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.77 ▼17.16
Media Library /wp-admin/upload.php3.30 ▲0.0738.98 ▲2.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Acclectic Lightbox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲29014.30 ▼0.2814.67 ▲12.8935.78 ▼15.01
Dashboard /wp-admin2,203 ▲125.84 ▼0.0499.33 ▼17.1640.47 ▼8.32
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.1340.08 ▲3.1934.69 ▼2.40
Add New Post /wp-admin/post-new.php1,532 ▲1323.19 ▼0.13668.84 ▼19.8038.68 ▼15.18
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.04102.59 ▲0.3746.90 ▲0.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 7× PHP files trigger server errors 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/controller.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-lightbox/inc/plugin.php on line 18
    • > 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
      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(): 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
      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
      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
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP file in "Acclectic Lightbox" ver. 1.6 adds more information about the plugin and also serves as the entry point for this 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 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin