Benchmarks
Plugin footprint 82% 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.23MB] [CPU: ▲0.52ms] Passed 4 tests
Analyzing server-side resources used by Treweler Map Builder
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 38.70 ▲2.34 |
Dashboard /wp-admin | 3.56 ▲0.26 | 45.95 ▼1.69 |
Posts /wp-admin/edit.php | 3.62 ▲0.27 | 49.03 ▲1.19 |
Add New Post /wp-admin/post-new.php | 6.12 ▲0.23 | 90.59 ▲2.45 |
Media Library /wp-admin/upload.php | 3.41 ▲0.18 | 35.68 ▲0.23 |
Server storage [IO: ▲35.63MB] [DB: ▲0.08MB] 67% from 3 tests
Filesystem and database footprint
Please try to fix the following items
- Total filesystem usage must be limited to 25MB (currently using 35.63MB)
Filesystem: 1,558 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
current_theme_supports_treweler |
widget_recent-comments |
theysaidso_admin_options |
treweler_queue_flush_rewrite_rules |
treweler_version |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Treweler Map Builder
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,883 ▲122 | 14.36 ▼0.20 | 1.69 ▲0.06 | 39.99 ▼0.52 |
Dashboard /wp-admin | 2,278 ▲101 | 5.62 ▲0.00 | 91.93 ▲2.36 | 40.68 ▲2.18 |
Posts /wp-admin/edit.php | 2,187 ▲87 | 2.01 ▲0.04 | 38.72 ▲2.19 | 36.69 ▼1.63 |
Add New Post /wp-admin/post-new.php | 1,580 ▲54 | 23.46 ▲0.27 | 678.42 ▼1.81 | 53.63 ▼2.09 |
Media Library /wp-admin/upload.php | 1,487 ▲87 | 4.21 ▲0.03 | 94.64 ▼2.11 | 41.37 ▼4.37 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- The uninstall procedure has failed, leaving 9 options in the database
- treweler_queue_flush_rewrite_rules
- widget_recent-posts
- widget_theysaidso_widget
- treweler_version
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- current_theme_supports_treweler
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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
The following issues need your attention
- 17× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/html.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/separator.php
- > /wp-content/plugins/treweler-map-builder/libs/smarty/smarty/demo/index.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/link-universal.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/line.php
- > /wp-content/plugins/treweler-map-builder/templates/filters/true-false.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/category.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/number.php
- > /wp-content/plugins/treweler-map-builder/templates/filters/multiselect.php
- > /wp-content/plugins/treweler-map-builder/templates/custom-fields/elements/multiselect.php
- 750× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/treweler-map-builder/libs/symfony/css-selector/Parser/Shortcut/ClassParser.php:29
- > PHP Fatal error
Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/treweler-map-builder/libs/google/apiclient-services/src/Sheets/BatchUpdateValuesRequest.php:20
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/treweler-map-builder/libs/google/apiclient-services/src/Sheets/LineStyle.php:20
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/treweler-map-builder/libs/google/apiclient-services/src/Sheets/DataSourceParameter.php:20
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\AsymmetricKey' not found in wp-content/plugins/treweler-map-builder/libs/phpseclib/phpseclib/phpseclib/Crypt/RSA.php:69
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/treweler-map-builder/libs/google/apiclient-services/src/Sheets/GradientRule.php:20
- > PHP Notice
Undefined variable: _smarty_tpl in wp-content/plugins/treweler-map-builder/includes/admin/views/templates_c/ecd5a3c3be1944a633f491c82385d718a9f77e57_0.file.goto-pro-message.tpl.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/treweler-map-builder/libs/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php:17
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/treweler-map-builder/libs/guzzlehttp/guzzle/src/Exception/ClientException.php:8
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/treweler-map-builder/libs/google/apiclient-services/src/Sheets/PivotValue.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
treweler-map-builder/treweler-free.php 85% from 13 tests
The main PHP file in "Treweler Map Builder" ver. 1.02 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("treweler-map-builder.php" instead of "treweler-free.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin290,164 lines of code in 1,443 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,307 | 19,097 | 67,254 | 116,976 |
CSS | 14 | 1,095 | 282 | 83,935 |
JavaScript | 36 | 15,133 | 13,919 | 75,243 |
Markdown | 44 | 3,099 | 0 | 8,724 |
JSON | 26 | 0 | 0 | 2,917 |
yacc | 2 | 253 | 382 | 991 |
PO File | 1 | 353 | 562 | 753 |
Smarty | 7 | 101 | 3 | 533 |
Bourne Shell | 3 | 8 | 3 | 53 |
SVG | 2 | 0 | 0 | 20 |
XML | 1 | 0 | 0 | 19 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 123)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 11.42 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 679.00 |
Average method complexity | 2.77 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 123.00 |
Code structure | ||
---|---|---|
Namespaces | 95 | |
Interfaces | 57 | |
Traits | 15 | |
Classes | 1,131 | |
▷ Abstract classes | 236 | 20.87% |
▷ Concrete classes | 895 | 79.13% |
▷ Final classes | 75 | 8.38% |
Methods | 6,810 | |
▷ Static methods | 907 | 13.32% |
▷ Public methods | 5,722 | 84.02% |
▷ Protected methods | 506 | 7.43% |
▷ Private methods | 582 | 8.55% |
Functions | 518 | |
▷ Named functions | 358 | 69.11% |
▷ Anonymous functions | 160 | 30.89% |
Constants | 730 | |
▷ Global constants | 43 | 5.89% |
▷ Class constants | 687 | 94.11% |
▷ Public constants | 638 | 92.87% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/marker-ring.png | 21.80KB | 9.45KB | ▼ 56.65% |