Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/distancefromme/distancefromme.php+30
Methods with the same name as their class will not be constructors in a future version of PHP; DistanceFromMeWidget has a deprecated constructor
Server metrics [RAM: ▼1.84MB] [CPU: ▼52.90ms] Passed 4 tests
This is a short check of server-side resources used by DistanceFromMe
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.15 ▼1.32 | 5.52 ▼36.08 |
Dashboard /wp-admin | 2.17 ▼1.14 | 7.31 ▼41.34 |
Posts /wp-admin/edit.php | 2.17 ▼1.19 | 8.38 ▼39.41 |
Add New Post /wp-admin/post-new.php | 2.17 ▼3.72 | 6.66 ▼94.78 |
Media Library /wp-admin/upload.php | 2.17 ▼1.06 | 5.37 ▼30.84 |
Server storage [IO: ▲0.13MB] [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, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_distancefrommewidget |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for DistanceFromMe
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,910 ▲175 | 13.59 ▼0.71 | 7.66 ▲5.76 | 43.71 ▼4.41 |
Dashboard /wp-admin | 2,208 ▲20 | 5.88 ▲1.03 | 107.40 ▼7.08 | 40.09 ▼6.23 |
Posts /wp-admin/edit.php | 2,091 ▲2 | 2.02 ▼0.02 | 35.80 ▼4.63 | 30.67 ▼5.92 |
Add New Post /wp-admin/post-new.php | 1,530 ▲11 | 23.14 ▼0.05 | 599.76 ▼59.24 | 54.83 ▲4.26 |
Media Library /wp-admin/upload.php | 1,390 ▲2 | 4.19 ▼0.05 | 98.45 ▼3.76 | 40.43 ▼0.04 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/distancefromme/distancefromme.php+30
Methods with the same name as their class will not be constructors in a future version of PHP; DistanceFromMeWidget has a deprecated constructor
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_distancefrommewidget
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 8× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined offset: 1 in wp-content/plugins/distancefromme/sosumi/class.sosumi.php on line 49
- > PHP Notice
Undefined offset: 1 in wp-content/plugins/distancefromme/sosumi/class.sosumi.php on line 49
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/distancefromme/distancefromme.php:18
- > PHP Fatal error
Uncaught Exception: Error parsing json string in wp-content/plugins/distancefromme/sosumi/class.sosumi.php:121
- > PHP Fatal error
Uncaught Exception: Error parsing json string in wp-content/plugins/distancefromme/sosumi/class.sosumi.php:121
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/distancefromme/distancefromme.php on line 16
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/distancefromme/distancefromme.php on line 16
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/distancefromme/distancefromme.php on line 16
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== distancefromme ===
) - Screenshots: Add images for these screenshots: #1 (Distancefromme widget in action), #2 (Configuration screen)
distancefromme/distancefromme.php 92% from 13 tests
Analyzing the main PHP file in "DistanceFromMe" version 0.3
The following require your attention:
- Description: Keep the plugin description shorter than 140 characters (currently 262 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin686 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 126 | 92 | 606 |
Markdown | 1 | 19 | 0 | 44 |
JavaScript | 1 | 13 | 15 | 36 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 12.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 23.00 |
Average method complexity | 3.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.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 | 21 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 11 | 52.38% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 47.62% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/banner-772x250.png | 35.08KB | 12.66KB | ▼ 63.93% |
screenshot-2.png | 18.85KB | 8.60KB | ▼ 54.40% |
screenshot-1.png | 33.71KB | 10.66KB | ▼ 68.39% |