79% slenderbox

Code Review | Slenderbox

WordPress plugin Slenderbox scored 79% from 54 tests.

About plugin

  • Plugin page: slenderbox
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.0
  • WordPress version: 5.8.1
  • First release: Dec 20, 2012
  • Latest release: Dec 9, 2018
  • Number of updates: 22
  • Update frequency: every 99.1 days
  • Top authors: petroffm (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

80+ active / 2,394 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 gracefully, with no errors

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

An overview of server-side resources used by Slenderbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0234.58 ▲2.92
Dashboard /wp-admin3.07 ▲0.0243.15 ▼5.58
Posts /wp-admin/edit.php3.12 ▲0.0245.63 ▲4.14
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.86 ▼565.24
Media Library /wp-admin/upload.php3.01 ▲0.0129.32 ▼2.69
Slenderbox /wp-admin/options-general.php?page=slenderbox/slenderbox.php2.9625.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
slenderbox_automate

Browser metrics Passed 4 tests

Checking browser requirements for Slenderbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12715.88 ▲0.2911.17 ▼0.1344.69 ▼8.66
Dashboard /wp-admin2,978 ▲475.91 ▼0.06131.33 ▼15.43114.54 ▼0.29
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0061.08 ▼3.2993.84 ▼6.39
Add New Post /wp-admin/post-new.php1,875 ▲19219.18 ▲0.32390.99 ▲15.62112.11 ▲2.35
Media Library /wp-admin/upload.php1,815 ▲25.03 ▼0.03141.51 ▲0.73116.23 ▼4.08
Slenderbox /wp-admin/options-general.php?page=slenderbox/slenderbox.php1,0312.0653.8466.78

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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • slenderbox_automate

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=slenderbox/slenderbox.php
    • > Notice in wp-content/plugins/slenderbox/slenderbox.php+46
    Undefined index: set_options

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/slenderbox/slenderbox.php:35

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: slenderbox, photo, picture, image, lightbox

slenderbox/slenderbox.php Passed 13 tests

The primary PHP file in "Slenderbox" version 1.1.2 is used by WordPress to initiate all plugin functionality
137 characters long description:
Overlays images on the current page using Slenderbox, a lightweight and framework-free lightbox plugin that can be used with valid HTML5.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin55 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1144049
JavaScript1015
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin