Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲4.39MB] [CPU: ▼279.01ms] 75% from 4 tests
An overview of server-side resources used by Distancr - Price by Location for WooCommerce
Please have a look at the following items
- CPU: Total CPU usage must kept under 500.00ms (currently 1,837.08ms on /wp-admin/admin.php?page=distancr)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.29 ▲4.78 | 79.16 ▲31.41 |
Dashboard /wp-admin | 8.31 ▲4.91 | 63.69 ▲30.60 |
Posts /wp-admin/edit.php | 8.31 ▲4.67 | 57.85 ▲15.72 |
Add New Post /wp-admin/post-new.php | 10.19 ▲3.22 | 114.19 ▼1,185.31 |
Media Library /wp-admin/upload.php | 8.31 ▲5.02 | 48.14 ▲22.95 |
Distancr /wp-admin/admin.php?page=distancr | 8.31 | 1,837.08 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 8.31 | 44.72 |
Server storage [IO: ▲3.11MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 191 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_active_plugins |
fs_accounts |
fs_gdpr |
fs_debug_mode |
Browser metrics Passed 4 tests
Distancr - Price by Location for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,909 ▲155 | 16.75 ▲0.70 | 12.76 ▲6.37 | 2.34 ▼0.51 |
Dashboard /wp-admin | 2,926 ▲65 | 6.14 ▼0.02 | 119.82 ▼16.72 | 174.75 ▲9.16 |
Posts /wp-admin/edit.php | 2,722 ▲31 | 3.25 ▲0.00 | 63.48 ▼1.49 | 155.46 ▲14.31 |
Add New Post /wp-admin/post-new.php | 1,698 ▼19 | 21.46 ▼0.22 | 474.09 ▲25.90 | 165.15 ▲3.90 |
Media Library /wp-admin/upload.php | 1,726 ▲28 | 5.52 ▲0.02 | 142.25 ▼1.72 | 206.67 ▲18.97 |
Distancr /wp-admin/admin.php?page=distancr | 1,256 | 2.46 | 55.58 | 166.80 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 1,433 | 2.49 | 55.53 | 114.06 |
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
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/distancr/inc/freemius/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- Zombie WordPress options were found after uninstall: 4 options
- fs_accounts
- fs_debug_mode
- fs_active_plugins
- fs_gdpr
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/distancr/distancr.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Screenshots: Add descriptions for screenshots #4, #5 in distancr/assets to your readme.txt
distancr/distancr.php 92% from 13 tests
The primary PHP file in "Distancr - Price by Location for WooCommerce" version 1.1.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "4.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected33,060 lines of code in 147 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 114 | 7,361 | 16,408 | 31,757 |
JavaScript | 19 | 144 | 160 | 711 |
CSS | 13 | 3 | 11 | 340 |
PO File | 1 | 97 | 163 | 252 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 84.26 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 4.65 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 50 | |
▷ Abstract classes | 2 | 4.00% |
▷ Concrete classes | 48 | 96.00% |
▷ Final classes | 0 | 0.00% |
Methods | 1,173 | |
▷ Static methods | 184 | 15.69% |
▷ Public methods | 833 | 71.01% |
▷ Protected methods | 15 | 1.28% |
▷ Private methods | 325 | 27.71% |
Functions | 99 | |
▷ Named functions | 99 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 125 | |
▷ Global constants | 100 | 80.00% |
▷ Class constants | 25 | 20.00% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
inc/freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
inc/freemius/assets/img/distancr.png | 11.03KB | 2.89KB | ▼ 73.78% |