83% loader-plus-lightbox

Code Review | Loader Plus Lightbox

WordPress plugin Loader Plus Lightbox scored83%from 54 tests.

About plugin

  • Plugin page: loader-plus-lightbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Feb 25, 2018
  • Number of updates: 12
  • Update frequency: every 103.6 days
  • Top authors: contact4sajid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /5,375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.00ms] Passed 4 tests

Analyzing server-side resources used by Loader Plus Lightbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0445.35 ▲2.95
Dashboard /wp-admin3.35 ▼0.0049.52 ▼15.71
Posts /wp-admin/edit.php3.40 ▲0.0451.25 ▲0.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.83 ▼11.92
Media Library /wp-admin/upload.php3.27 ▲0.0438.68 ▼0.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loader Plus Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.51 ▼0.679.25 ▲7.5938.54 ▼2.64
Dashboard /wp-admin2,198 ▲185.55 ▼0.1087.89 ▼7.4376.44 ▲29.82
Posts /wp-admin/edit.php2,115 ▲151.99 ▲0.0237.34 ▼3.3133.72 ▼1.38
Add New Post /wp-admin/post-new.php1,539 ▲1123.42 ▲0.31743.12 ▲72.0859.01 ▲9.55
Media Library /wp-admin/upload.php1,415 ▲154.15 ▼0.02109.56 ▼7.6182.50 ▲33.37

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/loader-plus-lightbox/lpl.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #0, #0, #0, #0, #0, #0, #0 in loader-plus-lightbox/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === loader-plus-lightbox === )
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

loader-plus-lightbox/lpl.php 92% from 13 tests

The entry point to "Loader Plus Lightbox" version 1.0 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: The principal plugin file should be the same as the plugin slug ("loader-plus-lightbox.php" instead of "lpl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin248 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP19226201
JavaScript29828
CSS17019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot 05.png7.87KB2.18KB▼ 72.29%
screenshot 01.png85.89KB21.03KB▼ 75.52%
screenshot 06.png15.76KB6.76KB▼ 57.11%
screenshot 02.png3.11KB1.23KB▼ 60.57%
screenshot 03.png5.70KB1.14KB▼ 79.94%