Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.05MB] [CPU: ▼5.87ms] Passed 4 tests
Analyzing server-side resources used by Lightbox
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 43.57 ▼5.71 |
Dashboard /wp-admin | 3.36 ▲0.05 | 54.27 ▲0.10 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 51.31 ▼3.93 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 89.20 ▼12.67 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 36.10 ▼1.16 |
Lightbox /wp-admin/options-general.php?page=lightbox | 3.30 | 33.98 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
mpcx_lightbox |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Lightbox: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,987 ▲226 | 13.48 ▼1.10 | 13.90 ▲11.98 | 46.44 ▼0.16 |
Dashboard /wp-admin | 2,202 ▲25 | 5.58 ▼0.02 | 86.76 ▼11.99 | 41.31 ▲0.23 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 1.96 ▼0.06 | 36.85 ▼3.98 | 34.04 ▼1.07 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.61 ▲0.58 | 653.86 ▼23.85 | 62.45 ▲12.11 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.34 ▲0.15 | 98.89 ▼3.53 | 44.11 ▼2.56 |
Lightbox /wp-admin/options-general.php?page=lightbox | 1,114 | 1.82 | 25.98 | 28.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 25% 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)
Almost there, just fix the following server-side errors
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=lightbox
- > Notice in wp-content/plugins/mpcx-lightbox/admin/options.php+91
Undefined index: colorbox_layout
SRP 0% 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 take a closer look at the following
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/mpcx-lightbox/admin/options.php
- > /wp-content/plugins/mpcx-lightbox/mpcx-lightbox.php
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mpcx-lightbox/update.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: lightbox, colorbox, gallery, fancybox, justified gallery
mpcx-lightbox/mpcx-lightbox.php Passed 13 tests
"Lightbox" version 1.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
15 characters long description:
Lightbox Plugin
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
Good job! No executable or dangerous file extensions detected578 lines of code in 57 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 38 | 27 | 468 |
PO File | 1 | 29 | 40 | 59 |
JavaScript | 43 | 0 | 30 | 43 |
CSS | 8 | 0 | 6 | 8 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 1 | 11.11% |
▷ Anonymous functions | 8 | 88.89% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/css/colorbox/3/images/border1.png | 0.61KB | 0.82KB | 0.00% |
public/css/colorbox/2/images/controls.png | 1.59KB | 1.67KB | 0.00% |
public/images/next.png | 1.32KB | 1.58KB | 0.00% |
public/css/colorbox/1/images/controls.png | 0.49KB | 0.57KB | 0.00% |
public/css/colorbox/0/images/overlay.png | 0.11KB | 0.15KB | 0.00% |