84% fancy-lightbox

Code Review | Fancy Lightbox

WordPress plugin Fancy Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: fancy-lightbox
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-4.6
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Aug 21, 2016
  • Number of updates: 7
  • Update frequency: every 45.3 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /13,689 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by Fancy Lightbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.19 ▼3.14
Dashboard /wp-admin3.32 ▼0.0339.97 ▼22.97
Posts /wp-admin/edit.php3.37 ▲0.0143.76 ▲0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0174.84 ▼13.29
Media Library /wp-admin/upload.php3.24 ▲0.0134.67 ▲1.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fancy Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21313.45 ▼1.159.83 ▲8.0537.16 ▼9.97
Dashboard /wp-admin2,195 ▲185.62 ▲0.0499.82 ▲14.1442.24 ▲4.53
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0234.92 ▼2.1433.24 ▲0.09
Add New Post /wp-admin/post-new.php1,526 ▼923.21 ▲4.80670.40 ▲58.1752.78 ▼15.37
Media Library /wp-admin/upload.php1,397 ▼34.28 ▲0.06101.42 ▲3.4541.63 ▲2.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/fancy-lightbox/fancy-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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 35 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"Fancy Lightbox" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
139 characters long description:
Add fancy lightbox easily, responsive lightbox and easy to use, without options and without complexity, compatible with all major browsers.

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
There were no executable files found in this plugin1,206 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript129436860
CSS15117317
PHP2222229

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/fancy_close.png1.48KB1.73KB0.00%
css/fancy_loading.png9.96KB6.30KB▼ 36.67%
css/fancy_shadow_n.png0.10KB0.19KB0.00%
css/fancy_shadow_nw.png0.32KB0.47KB0.00%
css/fancy_shadow_w.png0.10KB0.18KB0.00%