84% tailored-lightbox

Code Review | Tailored Lightbox

WordPress plugin Tailored Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: tailored-lightbox
  • Plugin version: 3.5.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Apr 18, 2021
  • Latest release: Apr 19, 2021
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: ajferg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,369 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Tailored Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.43 ▼4.88
Dashboard /wp-admin3.32 ▲0.0143.71 ▼10.47
Posts /wp-admin/edit.php3.37 ▲0.0144.53 ▼0.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.77 ▼10.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.45 ▲3.45

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Tailored Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16714.19 ▼0.438.60 ▲6.8643.08 ▼0.21
Dashboard /wp-admin2,206 ▲184.85 ▼0.16107.13 ▲5.1642.29 ▲0.92
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0734.53 ▼1.0132.91 ▼6.15
Add New Post /wp-admin/post-new.php1,533 ▲523.10 ▲0.04622.19 ▼71.4455.67 ▼9.51
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0694.86 ▼9.6342.01 ▼2.55

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tailored-lightbox/lightbox.php:33

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: lightbox, fancybox

tailored-lightbox/lightbox.php 92% from 13 tests

The entry point to "Tailored Lightbox" version 3.5.7.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tailored-lightbox.php" instead of "lightbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin4,610 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,1806543,811
CSS213319744
PHP1113338
JSON10013
Markdown1304

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin