Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.10MB] [CPU: ▼43.58ms] Passed 4 tests
This is a short check of server-side resources used by xLocate
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▼0.59 | 15.18 ▼21.16 |
Dashboard /wp-admin | 2.92 ▼0.43 | 18.94 ▼42.78 |
Posts /wp-admin/edit.php | 2.92 ▼0.44 | 16.09 ▼31.27 |
Add New Post /wp-admin/post-new.php | 2.92 ▼2.97 | 16.63 ▼79.10 |
Media Library /wp-admin/upload.php | 2.92 ▼0.31 | 16.20 ▼17.55 |
Category /wp-admin/edit-tags.php?taxonomy=xlocate-category&post_type=house | 2.92 | 21.60 |
All Houses /wp-admin/edit.php?post_type=house | 2.92 | 18.66 |
Add New /wp-admin/post-new.php?post_type=house | 2.92 | 17.85 |
Server storage [IO: ▲1.81MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_xloc_locations |
New WordPress options |
---|
widget_recent-posts |
xlocate_settings_pages |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
xloc_search_page |
Browser metrics Passed 4 tests
xLocate: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲100 | 13.25 ▼1.15 | 1.76 ▲0.19 | 44.19 ▲4.93 |
Dashboard /wp-admin | 2,249 ▲57 | 5.84 ▲0.69 | 94.23 ▼13.88 | 38.65 ▼1.95 |
Posts /wp-admin/edit.php | 2,132 ▲43 | 2.00 ▼0.09 | 35.04 ▼1.63 | 31.65 ▼2.85 |
Add New Post /wp-admin/post-new.php | 1,569 ▲36 | 23.26 ▲0.03 | 684.13 ▲0.63 | 50.80 ▼3.31 |
Media Library /wp-admin/upload.php | 1,431 ▲43 | 4.23 ▲0.04 | 103.07 ▲5.34 | 43.29 ▼3.43 |
Category /wp-admin/edit-tags.php?taxonomy=xlocate-category&post_type=house | 1,308 | 2.14 | 29.11 | 29.41 |
All Houses /wp-admin/edit.php?post_type=house | 1,155 | 1.97 | 31.31 | 32.60 |
Add New /wp-admin/post-new.php?post_type=house | 2,821 | 9.82 | 321.94 | 186.78 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_xloc_locations
- Zombie WordPress options were found after uninstall: 8 options
- widget_recent-posts
- can_compress_scripts
- xlocate_settings_pages
- xloc_search_page
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
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
These server-side errors were triggered
- 8 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=house
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/xlocate/admin/views/help.php
- > /wp-content/plugins/xlocate/xlocate.php
- > /wp-content/plugins/xlocate/admin/views/shortcodes.php
- 19× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_pages() in wp-content/plugins/xlocate/admin/views/pages.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlocate/admin/classes/class-xlocate-location.php:129
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xlocate/admin/classes/class-xlocate-admin-shortcodes-settings.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/xlocate/includes/shortcodes.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/xlocate/admin/views/contextual-help.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlocate/admin/classes/class-xlocate-admin.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xlocate/admin/classes/class-xlocate-admin-help-settings.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlocate/admin/classes/class-xlocate-admin-menus.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlocate/includes/custom-post-type.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlocate/frontend/classes/class-xlocate-search-handler.php:175
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/post-new.php?post_type=house
- > Console-api (warning) in unknown
https://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 234: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"
- > GET request to /wp-admin/post-new.php?post_type=house
- > Console-api (severe) in unknown
https://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 152:248 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in xlocate/assets to your readme.txt
xlocate/xlocate.php 85% from 13 tests
"xLocate" version 1.0.1'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 215 characters long)
- Domain Path: The domain path folder was not found ("/language")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,654 lines of code in 45 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 25 | 241 | 228 | 1,269 |
JavaScript | 9 | 303 | 611 | 1,229 |
CSS | 5 | 56 | 31 | 601 |
Sass | 4 | 86 | 1 | 515 |
JSON | 1 | 0 | 0 | 28 |
SVG | 1 | 0 | 0 | 12 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 1 | 8.33% |
Methods | 59 | |
▷ Static methods | 12 | 20.34% |
▷ Public methods | 59 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 7 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
5 PNG files occupy 1.58MB with 0.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/admin/images/skin-galaxy.png | 446.74KB | 153.96KB | ▼ 65.54% |
assets/admin/images/skin-mirage.png | 433.40KB | 147.69KB | ▼ 65.92% |
assets/admin/images/skin-default.png | 455.79KB | 156.36KB | ▼ 65.69% |
assets/frontend/images/marker.png | 2.86KB | 2.98KB | 0.00% |
assets/admin/images/skin-aliceblue.png | 283.86KB | 82.49KB | ▼ 70.94% |