68% your-lightbox

Code Review | Your Lightbox

WordPress plugin Your Lightbox scored68%from 54 tests.

About plugin

  • Plugin page: your-lightbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2013
  • Latest release: Jul 14, 2013
  • Number of updates: 9
  • Update frequency: every 1.1 days
  • Top authors: kinging (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,274 total downloads

Benchmarks

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

Server metrics [RAM: ▼0.94MB] [CPU: ▼38.99ms] Passed 4 tests

A check of server-side resources used by Your Lightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.18 ▼16.31
Dashboard /wp-admin3.00 ▼0.3024.43 ▼31.10
Posts /wp-admin/edit.php3.00 ▼0.3523.37 ▼29.79
Add New Post /wp-admin/post-new.php3.00 ▼2.8822.76 ▼78.75
Media Library /wp-admin/upload.php3.00 ▼0.2325.15 ▼13.27
Configure Lightbox /wp-admin/edit.php?page=yl3.0025.27

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Your Lightbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,046 ▲28513.57 ▼0.7815.74 ▲14.1941.40 ▼1.82
Dashboard /wp-admin2,199 ▲195.54 ▼0.0684.89 ▼5.2038.22 ▼2.91
Posts /wp-admin/edit.php2,107 ▲42.03 ▲0.0634.67 ▼6.4431.95 ▼5.13
Add New Post /wp-admin/post-new.php1,529 ▼823.04 ▲4.90658.21 ▲15.4653.52 ▼7.47
Media Library /wp-admin/upload.php1,398 ▼54.19 ▲0.0597.36 ▼3.4342.68 ▼6.66
Configure Lightbox /wp-admin/edit.php?page=yl8611.9627.3527.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=yl
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+11
    Undefined index: content
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+12
    Undefined index: width
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+13
    Undefined index: height
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+14
    Undefined index: title
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+15
    Undefined index: ytmslb
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+16
    Undefined index: checkform
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+17
    Undefined index: ytmslb_like
    • > GET request to /wp-admin/edit.php?page=yl
    • > Notice in wp-content/plugins/your-lightbox/settings/lbsettings.php+18
    Undefined index: like_url

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: like_url in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 18
    • > PHP Notice
      Undefined index: ytmslb_like in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/your-lightbox/yourlightbox.php:22
    • > PHP Notice
      Undefined index: ytmslb in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/your-lightbox/settings/lbsettings.php:85
    • > PHP Notice
      Undefined index: title in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 14
    • > PHP Notice
      Undefined index: width in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 12
    • > PHP Notice
      Undefined index: content in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 11
    • > PHP Notice
      Undefined index: checkform in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 16
    • > PHP Notice
      Undefined index: height in wp-content/plugins/your-lightbox/settings/lbsettings.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: like, message, lightbox, website

your-lightbox/yourlightbox.php 92% from 13 tests

The main PHP file in "Your Lightbox" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("your-lightbox.php" instead of "yourlightbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin920 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript115369720
PHP215215136
CSS141864

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions7
▷ Named functions7100.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
12 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/loading_background.png0.15KB0.15KB▼ 0.64%
includes/images/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%
includes/images/overlay.png0.18KB0.15KB▼ 15.93%
includes/images/ie6/borderMiddleLeft.png0.11KB0.10KB▼ 7.41%
includes/images/ie6/borderTopRight.png0.21KB0.20KB▼ 2.34%