84% one-click-lightbox

Code Review | One Click Lightbox

WordPress plugin One Click Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: one-click-lightbox
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: Jul 27, 2019
  • Number of updates: 8
  • Update frequency: every 116.5 days
  • Top authors: schlodi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼1.51ms] Passed 4 tests

Analyzing server-side resources used by One Click Lightbox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0631.11 ▼10.00
Dashboard /wp-admin3.32 ▲0.0246.14 ▼0.91
Posts /wp-admin/edit.php3.37 ▲0.0247.47 ▲3.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.96 ▲3.69
Media Library /wp-admin/upload.php3.24 ▲0.0236.98 ▲1.54

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for One Click Lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.58 ▼0.792.97 ▲1.2437.91 ▼9.21
Dashboard /wp-admin2,225 ▲345.88 ▲0.9797.32 ▼3.3638.84 ▼4.41
Posts /wp-admin/edit.php2,105 ▲162.06 ▼0.1340.37 ▲6.2535.04 ▼1.41
Add New Post /wp-admin/post-new.php1,556 ▲2318.61 ▼4.65589.51 ▼98.9852.87 ▼15.69
Media Library /wp-admin/upload.php1,407 ▲164.19 ▲0.0494.47 ▼7.6543.76 ▼0.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/one-click-lightbox/one-click-lightbox.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

one-click-lightbox/one-click-lightbox.php Passed 13 tests

Analyzing the main PHP file in "One Click Lightbox" version 1.1.2
28 characters long description:
Adds a lightbox to your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin273 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13797170
PO File13265101
CSS1021
JavaScript1021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/prev.png1.33KB1.59KB0.00%
img/close.png0.27KB0.29KB0.00%
img/next.png1.32KB1.58KB0.00%