83% wui-lightbox

Code Review | WUI LightBox

WordPress plugin WUI LightBox scored83%from 54 tests.

About plugin

  • Plugin page: wui-lightbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Mar 12, 2016
  • Number of updates: 25
  • Update frequency: every 3.0 days
  • Top authors: iyas0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by WUI LightBox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.85 ▼10.36
Dashboard /wp-admin3.32 ▼0.0246.84 ▼18.43
Posts /wp-admin/edit.php3.37 ▲0.0249.67 ▼2.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.66 ▼13.20
Media Library /wp-admin/upload.php3.25 ▲0.0236.62 ▲0.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WUI LightBox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲25813.91 ▼0.6117.75 ▲16.0541.86 ▼1.35
Dashboard /wp-admin2,222 ▲345.81 ▼0.05104.17 ▼10.2240.47 ▼16.34
Posts /wp-admin/edit.php2,108 ▲192.00 ▼0.0236.95 ▼0.7334.66 ▼0.69
Add New Post /wp-admin/post-new.php1,546 ▲1323.47 ▲0.33653.28 ▲9.6757.69 ▲1.57
Media Library /wp-admin/upload.php1,404 ▲194.18 ▼0.0395.29 ▼10.8842.99 ▼2.83

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wui-lightbox/includes/wui_lightbox_functions.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wui-lightbox/includes/wui_lightbox_options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wui-lightbox/includes/wui_lightbox_functions.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: "No need to"
The official readme.txt might help

wui-lightbox/index.php 85% from 13 tests

"WUI LightBox" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wui-lightbox.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin101 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3101994
CSS3024
JavaScript2023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin