Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.66MB] [CPU: ▲2.95ms] 75% from 4 tests
This is a short check of server-side resources used by Locations and Areas - Leaflet Map with Region Tabs
The following require your attention
- CPU: Total CPU usage should be kept under 500.00ms (currently 2,194.87ms on /wp-admin/options-general.php?page=locations_and_areas)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.12 ▲0.66 | 39.94 ▼3.56 |
Dashboard /wp-admin | 3.99 ▲0.69 | 55.20 ▲5.40 |
Posts /wp-admin/edit.php | 4.06 ▲0.70 | 92.65 ▲43.70 |
Add New Post /wp-admin/post-new.php | 6.51 ▲0.62 | 94.30 ▲2.84 |
Media Library /wp-admin/upload.php | 3.89 ▲0.66 | 40.30 ▲7.12 |
Areas /wp-admin/edit-tags.php?taxonomy=laa-area&post_type=laa-location | 3.94 | 45.59 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 4.25 | 43.51 |
All locations /wp-admin/edit.php?post_type=laa-location | 3.96 | 45.14 |
Locations and Areas /wp-admin/options-general.php?page=locations_and_areas | 4.15 | 2,194.87 |
Add location /wp-admin/post-new.php?post_type=laa-location | 4.01 | 57.47 |
Server storage [IO: ▲8.14MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 265 new files
Database: no new tables, 9 new options
New WordPress options |
---|
fs_active_plugins |
fs_accounts |
fs_debug_mode |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
Locations and Areas - Leaflet Map with Region Tabs: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,015 ▲280 | 15.98 ▲1.61 | 1.57 ▼0.01 | 32.55 ▼9.44 |
Dashboard /wp-admin | 2,415 ▲224 | 7.22 ▲2.35 | 145.52 ▲42.03 | 46.88 ▲2.37 |
Posts /wp-admin/edit.php | 2,324 ▲235 | 3.94 ▲1.90 | 52.55 ▲12.07 | 36.88 ▲0.61 |
Add New Post /wp-admin/post-new.php | 6,470 ▲4,947 | 21.36 ▼1.83 | 1,041.35 ▲400.65 | 39.05 ▼19.96 |
Media Library /wp-admin/upload.php | 1,460 ▲69 | 5.32 ▲1.16 | 82.24 ▼10.42 | 47.39 ▲1.77 |
Areas /wp-admin/edit-tags.php?taxonomy=laa-area&post_type=laa-location | 1,531 | 4.19 | 58.96 | 55.26 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,306 | 3.72 | 44.46 | 28.30 |
All locations /wp-admin/edit.php?post_type=laa-location | 1,318 | 4.01 | 47.88 | 30.29 |
Locations and Areas /wp-admin/options-general.php?page=locations_and_areas | 1,197 | 3.76 | 47.55 | 88.20 |
Add location /wp-admin/post-new.php?post_type=laa-location | 2,291 | 7.76 | 171.36 | 70.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/locations-and-areas/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- widget_recent-posts
- fs_accounts
- can_compress_scripts
- fs_debug_mode
- widget_theysaidso_widget
- widget_recent-comments
- fs_active_plugins
- db_upgraded
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/locations-and-areas/locations-and-areas.php
- 9× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Pages/Settings.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Base/BlockController.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Base/Enqueue.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Pages/Frontend.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Base/SettingsLinks.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Base/LocationController.php:10
- > PHP Fatal error
Uncaught Error: Class 'LocationsAndAreasPlugin\\Base\\BaseController' not found in wp-content/plugins/locations-and-areas/inc/Base/AreaController.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/locations-and-areas/templates/page-backend-settings.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/locations-and-areas/templates/block-map.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
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
8 plugin tags: leaflet, area, gutenberg, pins, region...
locations-and-areas/locations-and-areas.php 92% from 13 tests
"Locations and Areas - Leaflet Map with Region Tabs" version 1.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 158 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected71,982 lines of code in 187 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 140 | 8,244 | 17,511 | 34,609 |
JavaScript | 19 | 5,325 | 7,049 | 17,574 |
JSON | 6 | 0 | 0 | 16,689 |
CSS | 20 | 305 | 74 | 2,017 |
Sass | 2 | 236 | 34 | 1,093 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 74.05 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 62 | |
▷ Abstract classes | 2 | 3.23% |
▷ Concrete classes | 60 | 96.77% |
▷ Final classes | 1 | 1.67% |
Methods | 1,322 | |
▷ Static methods | 215 | 16.26% |
▷ Public methods | 931 | 70.42% |
▷ Protected methods | 17 | 1.29% |
▷ Private methods | 374 | 28.29% |
Functions | 108 | |
▷ Named functions | 103 | 95.37% |
▷ Anonymous functions | 5 | 4.63% |
Constants | 145 | |
▷ Global constants | 98 | 67.59% |
▷ Class constants | 47 | 32.41% |
▷ Public constants | 47 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
26 PNG files occupy 0.86MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
src/leaflet/images/marker-icon_custom4-2x.png | 3.20KB | 1.61KB | ▼ 49.62% |
src/leaflet/images/marker-icon_custom2-2x.png | 4.73KB | 2.47KB | ▼ 47.79% |
src/leaflet/images/marker-shadow.png | 0.60KB | 1.16KB | 0.00% |
src/leaflet/images/marker-icon_custom3.png | 2.41KB | 1.23KB | ▼ 49.15% |
src/leaflet/images/marker-icon_custom3-2x.png | 4.37KB | 1.98KB | ▼ 54.57% |