Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼4.54ms] Passed 4 tests
An overview of server-side resources used by WP Spatial Capabilities Check
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.02 | 38.18 ▼0.22 |
Dashboard /wp-admin | 3.32 ▲0.02 | 45.95 ▼2.90 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 48.13 ▲3.35 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 91.98 ▼11.52 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 33.05 ▼3.53 |
Spatial Capabilites /wp-admin/tools.php?page=spatial-capabilites | 3.55 | 193.82 |
Server storage [IO: ▲2.06MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 123 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Spatial Capabilities Check
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲47 | 13.65 ▼0.63 | 1.73 ▼0.30 | 44.75 ▼4.16 |
Dashboard /wp-admin | 2,210 ▲19 | 5.83 ▼0.05 | 100.99 ▲1.03 | 38.74 ▼5.03 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.04 ▲0.03 | 40.21 ▲0.77 | 36.56 ▲2.54 |
Add New Post /wp-admin/post-new.php | 1,522 ▼11 | 23.26 ▼0.01 | 585.09 ▼55.67 | 65.73 ▲12.25 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.24 ▲0.04 | 98.76 ▼4.24 | 41.81 ▼2.01 |
Spatial Capabilites /wp-admin/tools.php?page=spatial-capabilites | 1,677 | 2.05 | 24.65 | 36.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
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)
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 20× GET requests to PHP files return non-empty strings (only 10 are shown):
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/wp-geometa-lib.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/wp-geometa-lib-loader.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/LoadDataTest.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/UnloadDataTest.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/wp-geoquery.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/geoPHP/tests/postgis.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/QueryOrderByTest.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/PopulateTable.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/TablesCreatedTest.php
- > /wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/LoadLatLng.php
- 262× PHP files trigger server errors when accessed directly (only 10 are shown):
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (24) made by wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (77) made by require('/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/UnloadDataTest.php'), wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
- > PHP Fatal error
Uncaught Error: Class 'WKT' not found in wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/geoPHP/lib/adapters/EWKT.class.php:5
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (98,99) made by require('/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/UnloadDataTest.php'), wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
- > PHP Warning
require_once(../geoPHP.inc): failed to open stream: No such file or directory in wp-content/plugins/wp-spatial-capabilities-check/wp-geometa-lib/geoPHP/tests/tests/methodsTest.php on line 2
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (67) made by require('/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/UnloadDataTest.php'), wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query SELECT Dimension(meta_value) FROM wp_postmeta_geo WHERE meta_key='wpgeometa_test' AND post_id='44' made by require('/plugins/wp-spatial-capabilities-check/wp-geometa-lib/test/tests/QueryOrderByTest.php')
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (50) made by wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query INSERT INTO wp_postmeta_geo \t\t\t\t(\t\tpost_id,\t\tfk_meta_id,\t\tmeta_key,\t\tmeta_value\t) VALUES (\t\t14,\t\t51,\t\t'myplugin_geo',\t\tGeomFromText('MULTIPOINT (-93 44)',4326)\t) ON DUPLICATE KEY UPDATE meta_value=GeomFromText('MULTIPOINT (-93 44)',4326) made by update_post_meta, update_metadata, add_metadata, do_action('added_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->upsert_meta
- > WordPress database error Table 'potrivit.wp_postmeta_geo' doesn't exist for query DELETE FROM wp_postmeta_geo WHERE fk_meta_id IN (27) made by wp_delete_post, delete_metadata_by_mid, do_action('deleted_post_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WP_GeoMeta->__call, WP_GeoMeta->deleted_meta
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
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
6 plugin tags: mysql, gis, spatial, mapping, geography...
wp-spatial-capabilities-check/wp-spatial-capabilities-check.php Passed 13 tests
The entry point to "WP Spatial Capabilities Check" version 0.0.4 is a PHP file that has certain tags in its header comment area
76 characters long description:
Check what spatial functions your version of MySQL or MariaDB has available.
Code Analysis Passed 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 plugin26,254 lines of code in 87 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
XML | 12 | 2 | 0 | 18,393 |
PHP | 52 | 1,132 | 1,655 | 5,835 |
Markdown | 8 | 328 | 0 | 908 |
HTML | 1 | 15 | 0 | 720 |
SQL | 4 | 76 | 20 | 130 |
Pascal | 1 | 43 | 162 | 95 |
PO File | 1 | 28 | 43 | 90 |
JSON | 4 | 0 | 0 | 40 |
Bourne Shell | 3 | 13 | 5 | 25 |
YAML | 1 | 6 | 5 | 18 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 32.13 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 166.00 |
Average method complexity | 4.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 83.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 31 | |
▷ Abstract classes | 3 | 9.68% |
▷ Concrete classes | 28 | 90.32% |
▷ Final classes | 0 | 0.00% |
Methods | 348 | |
▷ Static methods | 48 | 13.79% |
▷ Public methods | 265 | 76.15% |
▷ Protected methods | 42 | 12.07% |
▷ Private methods | 41 | 11.78% |
Functions | 18 | |
▷ Named functions | 16 | 88.89% |
▷ Anonymous functions | 2 | 11.11% |
Constants | 21 | |
▷ Global constants | 6 | 28.57% |
▷ Class constants | 15 | 71.43% |
▷ Public constants | 15 | 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
7 PNG files occupy 0.76MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 11.90KB | 4.21KB | ▼ 64.59% |
assets/banner-1544x500.png | 340.68KB | 158.58KB | ▼ 53.45% |
assets/screenshot-1.png | 185.61KB | 47.35KB | ▼ 74.49% |
assets/icon-256x256.png | 22.90KB | 7.53KB | ▼ 67.10% |
assets/screenshot-2.png | 15.36KB | 4.31KB | ▼ 71.91% |