Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.35MB] [CPU: ▼6.10ms] 75% from 4 tests
An overview of server-side resources used by Leaflet Map
Please fix the following
- CPU: Total CPU usage should be kept under 500.00ms (currently 4,975.13ms on /wp-admin/admin.php?page=leaflet-shortcode-helper)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.82 ▲0.36 | 43.37 ▲5.85 |
Dashboard /wp-admin | 3.70 ▲0.36 | 50.94 ▼8.65 |
Posts /wp-admin/edit.php | 3.75 ▲0.40 | 47.86 ▼1.94 |
Add New Post /wp-admin/post-new.php | 6.24 ▲0.36 | 85.09 ▼19.65 |
Media Library /wp-admin/upload.php | 3.56 ▲0.34 | 43.09 ▲7.04 |
Shortcode helper /wp-admin/admin.php?page=leaflet-shortcode-helper | 3.59 | 4,975.13 |
Settings /wp-admin/admin.php?page=leaflet-map | 3.56 | 40.05 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 17 new options
New WordPress options |
---|
widget_theysaidso_widget |
leaflet_osm_Halifax%2C+Nova+Scotia |
leaflet_osm_San+Juan |
leaflet_osm_Tanzania |
leaflet_osm_Puerto+Vallarta |
leaflet_osm_twilight+lane%2C+nova+scotia |
theysaidso_admin_options |
leaflet_osm_Ha+Ling%2C+canmore |
leaflet_osm_Miami |
leaflet_osm_Sayulita |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Leaflet Map
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲68 | 14.14 ▼0.51 | 1.69 ▲0.16 | 44.59 ▲5.99 |
Dashboard /wp-admin | 2,236 ▲59 | 5.59 ▼0.01 | 83.63 ▼19.48 | 41.72 ▼3.69 |
Posts /wp-admin/edit.php | 2,140 ▲40 | 2.01 ▲0.02 | 37.31 ▲0.20 | 32.35 ▼0.31 |
Add New Post /wp-admin/post-new.php | 1,548 ▲22 | 23.28 ▼0.27 | 684.28 ▲23.68 | 59.81 ▼10.31 |
Media Library /wp-admin/upload.php | 1,435 ▲35 | 4.19 ▼0.02 | 97.46 ▼14.72 | 42.81 ▼5.97 |
Shortcode helper /wp-admin/admin.php?page=leaflet-shortcode-helper | 6,067 | 5.34 | 175.58 | 83.60 |
Settings /wp-admin/admin.php?page=leaflet-map | 1,669 | 2.01 | 25.23 | 46.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking 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 fix the following
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/leaflet-map/templates/settings.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/leaflet-map/templates/shortcode-helper.php:32
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/leaflet-map/templates/settings.php on line 11
- > PHP Notice
Undefined variable: plugin_data in wp-content/plugins/leaflet-map/templates/settings.php on line 11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: javascript, leaflet, mapquest, openstreetmap, mobile...
leaflet-map/leaflet-map.php Passed 13 tests
"Leaflet Map" version 3.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
A plugin for creating a Leaflet JS map with a shortcode. Boasts two free map tile services and three free geocoders.
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
Success! There were no dangerous files found in this plugin2,883 lines of code in 34 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 363 | 821 | 1,970 |
JavaScript | 8 | 95 | 117 | 469 |
Markdown | 3 | 126 | 0 | 349 |
CSS | 1 | 15 | 4 | 95 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 13.78 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 57.00 |
Average method complexity | 5.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 47.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 18 | |
▷ Abstract classes | 1 | 5.56% |
▷ Concrete classes | 17 | 94.44% |
▷ Final classes | 0 | 0.00% |
Methods | 59 | |
▷ Static methods | 10 | 16.95% |
▷ Public methods | 36 | 61.02% |
▷ Protected methods | 14 | 23.73% |
▷ Private methods | 9 | 15.25% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 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
No PNG images were found in this plugin