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
Installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼7.94ms] Passed 4 tests
Analyzing server-side resources used by Defer Media
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 38.33 ▼6.10 |
Dashboard /wp-admin | 3.40 ▲0.10 | 44.81 ▼5.02 |
Posts /wp-admin/edit.php | 3.43 ▲0.08 | 44.29 ▼3.86 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.19 | 73.78 ▼16.78 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 33.61 ▼0.88 |
Defer Media /wp-admin/options-general.php?page=defer-media-options | 3.26 | 30.30 |
Server storage [IO: ▲2.86MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Defer Media
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,833 ▲76 | 13.19 ▼1.10 | 7.14 ▲4.93 | 44.48 ▼2.73 |
Dashboard /wp-admin | 2,213 ▲25 | 5.90 ▲0.98 | 95.97 ▼22.64 | 36.67 ▼7.50 |
Posts /wp-admin/edit.php | 2,090 ▲1 | 1.96 ▼0.07 | 34.03 ▼1.63 | 37.36 ▲3.83 |
Add New Post /wp-admin/post-new.php | 1,536 ▲2 | 22.80 ▼0.40 | 578.76 ▼45.56 | 50.17 ▲1.61 |
Media Library /wp-admin/upload.php | 1,383 ▼5 | 4.23 ▲0.01 | 99.90 ▼2.71 | 43.09 ▲1.37 |
Defer Media /wp-admin/options-general.php?page=defer-media-options | 817 | 2.03 | 23.84 | 28.82 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 50% 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 fix the following
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/defer-media/lib/Optimize.php
- > /wp-content/plugins/defer-media/DeferMedia.php
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 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
6 plugin tags: speed, optimize, lazy, images, gallery...
defer-media/DeferMedia.php 92% from 13 tests
Analyzing the main PHP file in "Defer Media" version 1.0.0
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("defer-media.php" instead of "DeferMedia.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin458 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 57 | 24 | 457 |
HTML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 12.00 |
▷ Minimum class complexity | 12.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 3.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 4 | 66.67% |
▷ Anonymous functions | 2 | 33.33% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 2.84MB with 2.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
docs/screenshot2-after.png | 472.09KB | 147.52KB | ▼ 68.75% |
docs/screenshot2-before.png | 479.01KB | 152.18KB | ▼ 68.23% |
(invalid) lib/loading.png | 23.73KB | 0.00KB | ▼ 100.00% |
docs/uberhumor-post-before.png | 760.42KB | 218.88KB | ▼ 71.22% |
docs/screenshot1-after.png | 186.50KB | 52.45KB | ▼ 71.88% |