Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.32MB] [CPU: ▲1.18ms] Passed 4 tests
Analyzing server-side resources used by LazyLoad Background Images
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.84 ▲0.38 | 41.60 ▼3.33 |
Dashboard /wp-admin | 3.66 ▲0.35 | 55.24 ▲5.37 |
Posts /wp-admin/edit.php | 3.71 ▲0.35 | 50.38 ▼1.86 |
Add New Post /wp-admin/post-new.php | 6.17 ▲0.29 | 131.44 ▲18.63 |
Media Library /wp-admin/upload.php | 3.52 ▲0.29 | 38.65 ▲4.52 |
Lazy Backgrounds /wp-admin/options-general.php?page=lazyload-bg | 3.50 | 37.81 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
pb_lazybg_settings |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for LazyLoad Background Images
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,833 ▲87 | 13.23 ▼1.15 | 2.40 ▲0.62 | 44.78 ▲2.04 |
Dashboard /wp-admin | 2,210 ▲28 | 5.85 ▼0.07 | 121.69 ▼3.38 | 42.40 ▼2.16 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.01 ▼0.01 | 35.66 ▼6.96 | 34.02 ▼3.33 |
Add New Post /wp-admin/post-new.php | 1,545 ▲12 | 18.26 ▼4.80 | 765.43 ▲126.62 | 62.12 ▼0.37 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.20 ▲0.01 | 96.59 ▼13.04 | 44.45 ▼0.29 |
Lazy Backgrounds /wp-admin/options-general.php?page=lazyload-bg | 949 | 1.73 | 25.35 | 49.93 |
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
Please fix the following items
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 3× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/lazyload-background-images/admin/templates/more.php
- > /wp-content/plugins/lazyload-background-images/lazyload-bg.php
- > /wp-content/plugins/lazyload-background-images/admin/templates/settings.php
- 9× PHP files trigger server errors when accessed directly:
- > PHP Warning
include_once(): Failed opening 'PBLZBG_PLUGIN_DIRinc/html-modifier.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/lazyload-background-images/init.php on line 34
- > PHP Fatal error
require_once(): Failed opening required 'PBLZBG_PLUGIN_DIRadmin/core/class-bg-image-processor.php' (include_path='.:/usr/share/php') in wp-content/plugins/lazyload-background-images/init.php on line 36
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/lazyload-background-images/admin/initialize.php:9
- > PHP Warning
Use of undefined constant PBLZBG_PLUGIN_DIR - assumed 'PBLZBG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/lazyload-background-images/init.php on line 34
- > PHP Warning
require_once(PBLZBG_PLUGIN_DIRadmin/core/class-bg-image-processor.php): failed to open stream: No such file or directory in wp-content/plugins/lazyload-background-images/init.php on line 36
- > PHP Warning
include_once(PBLZBG_PLUGIN_DIRinc/html-modifier.php): failed to open stream: No such file or directory in wp-content/plugins/lazyload-background-images/init.php on line 34
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lazyload-background-images/admin/core/class-bg-image-processor.php:15
- > PHP Warning
Use of undefined constant PBLZBG_PLUGIN_DIR - assumed 'PBLZBG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/lazyload-background-images/init.php on line 36
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lazyload-background-images/admin/plugin-functions.php:18
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: backgound-images-lazyload, speed-optimization, lazybg, lazyload, lazyload-bg
lazyload-background-images/lazyload-bg.php 85% from 13 tests
"LazyLoad Background Images" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("lazyload-background-images.php" instead of "lazyload-bg.php")
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
Success! There were no dangerous files found in this plugin2,261 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 429 | 373 | 2,120 |
CSS | 1 | 9 | 9 | 140 |
JavaScript | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 82.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 249.00 |
Average method complexity | 4.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 66.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 102 | |
▷ Static methods | 8 | 7.84% |
▷ Public methods | 87 | 85.29% |
▷ Protected methods | 15 | 14.71% |
▷ Private methods | 0 | 0.00% |
Functions | 10 | |
▷ Named functions | 9 | 90.00% |
▷ Anonymous functions | 1 | 10.00% |
Constants | 27 | |
▷ Global constants | 27 | 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
1 PNG file occupies 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/assets/img/Proloy-bhaduri.png | 238.12KB | 82.72KB | ▼ 65.26% |