Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲1.13MB] [CPU: ▲7.03ms] Passed 4 tests
Analyzing server-side resources used by Simple Locator
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.56 ▲1.09 | 52.87 ▲15.52 |
Dashboard /wp-admin | 4.44 ▲1.13 | 60.87 ▲9.14 |
Posts /wp-admin/edit.php | 4.50 ▲1.14 | 61.86 ▲15.21 |
Add New Post /wp-admin/post-new.php | 7.09 ▲1.21 | 102.91 ▼5.36 |
Media Library /wp-admin/upload.php | 4.36 ▲1.13 | 45.13 ▲9.14 |
Simple Locator /wp-admin/options-general.php?page=wp_simple_locator | 4.43 | 48.17 |
Locations /wp-admin/edit.php?post_type=location | 4.47 | 54.43 |
Add New /wp-admin/post-new.php?post_type=location | 7.04 | 92.13 |
Server storage [IO: ▲3.11MB] [DB: ▲0.02MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 467 new files
Database: 1 new table, 27 new options
New tables |
---|
wp_simple_locator_history |
New WordPress options |
---|
wpsl_output_css |
wpsl_version |
wpsl_measurement_unit |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
wpsl_posttype_labels |
wpsl_default_map |
wpsl_geo_button |
widget_recent-posts |
... |
Browser metrics Passed 4 tests
A check of browser resources used by Simple Locator
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,827 ▲41 | 14.28 ▼0.32 | 1.73 ▼0.25 | 43.86 ▼1.02 |
Dashboard /wp-admin | 2,225 ▲48 | 5.52 ▼0.13 | 85.46 ▼8.60 | 39.14 ▼2.22 |
Posts /wp-admin/edit.php | 2,133 ▲33 | 2.03 ▲0.07 | 39.06 ▼0.12 | 34.55 ▼5.58 |
Add New Post /wp-admin/post-new.php | 1,554 ▲28 | 23.18 ▲0.12 | 674.75 ▼0.31 | 58.64 ▲0.47 |
Media Library /wp-admin/upload.php | 1,433 ▲33 | 4.27 ▲0.08 | 97.69 ▼12.15 | 44.91 ▼3.35 |
Simple Locator /wp-admin/options-general.php?page=wp_simple_locator | 1,531 | 4.14 | 84.00 | 28.40 |
Locations /wp-admin/edit.php?post_type=location | 1,335 | 4.42 | 95.56 | 29.15 |
Add New /wp-admin/post-new.php?post_type=location | 6,299 | 19.78 | 929.48 | 43.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- Zombie tables were found after uninstall: 1 table
- wp_simple_locator_history
- This plugin does not fully uninstall, leaving 27 options in the database
- wpsl_singular_data
- wpsl_post_type
- wpsl_gmaps_api_admin
- wpsl_map_styles_type
- wpsl_lng_field
- wpsl_field_type
- wpsl_map_styles_choice
- wpsl_lat_field
- widget_theysaidso_widget
- can_compress_scripts
- ...
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=location
- > Notice in wp-content/plugins/simple-locator/app/Listeners/GetMetaFieldsForPostType.php+46
Undefined index: post_type
SRP 0% 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
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/simple-locator/app/Migrations/map_options/cluster-renderer.php
- 124× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'SimpleLocator\\Services\\Import\\Listeners\\ImportListenerBase' not found in wp-content/plugins/simple-locator/app/Services/Import/Listeners/FileUploader.php:10
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/simple-locator/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:4
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/simple-locator/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/simple-locator/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\Test\\TestCase' not found in wp-content/plugins/simple-locator/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/simple-locator/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-locator/vendor/guzzlehttp/psr7/src/AppendStream.php:14
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-locator/views/settings/import-1.php:5
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/simple-locator/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php:4
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-locator/views/settings/import-2.php:2
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=location
- > Console-api (warning) in unknown
https://maps.google.com/maps/api/js?libraries=places&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: store map, locations, store locator, google maps, locator...
simple-locator/simplelocator.php 77% from 13 tests
"Simple Locator" version 2.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 157 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-locator.php" instead of "simplelocator.php")
- Git Repository: A Git repository was detected inside this plugin
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
Everything looks great! No dangerous files found in this plugin47,983 lines of code in 405 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 292 | 3,644 | 9,222 | 36,450 |
Markdown | 17 | 1,315 | 0 | 3,869 |
JavaScript | 39 | 411 | 602 | 3,301 |
Sass | 27 | 111 | 101 | 1,657 |
JSON | 12 | 0 | 0 | 1,330 |
PO File | 4 | 490 | 526 | 1,217 |
YAML | 6 | 25 | 3 | 99 |
SVG | 4 | 0 | 1 | 25 |
XML | 1 | 2 | 0 | 23 |
Dockerfile | 1 | 8 | 0 | 10 |
CSS | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 12.10 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 3.01 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 45 | |
Interfaces | 16 | |
Traits | 7 | |
Classes | 206 | |
▷ Abstract classes | 9 | 4.37% |
▷ Concrete classes | 197 | 95.63% |
▷ Final classes | 24 | 12.18% |
Methods | 1,306 | |
▷ Static methods | 170 | 13.02% |
▷ Public methods | 955 | 73.12% |
▷ Protected methods | 57 | 4.36% |
▷ Private methods | 294 | 22.51% |
Functions | 183 | |
▷ Named functions | 76 | 41.53% |
▷ Anonymous functions | 107 | 58.47% |
Constants | 201 | |
▷ Global constants | 78 | 38.81% |
▷ Class constants | 123 | 61.19% |
▷ Public constants | 123 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 1.01MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/datepicker-arrow-prev.png | 1.05KB | 0.21KB | ▼ 79.98% |
assets/screenshot-3.png | 73.62KB | 72.23KB | ▼ 1.88% |
assets/icon-128x128.png | 6.38KB | 3.11KB | ▼ 51.22% |
assets/banner-772x250.png | 22.09KB | 21.83KB | ▼ 1.20% |
assets/screenshot-1.png | 3.81KB | 3.76KB | ▼ 1.41% |