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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.11MB] [CPU: ▼1.81ms] Passed 4 tests
This is a short check of server-side resources used by Klarna Payments for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 36.77 ▼4.39 |
Dashboard /wp-admin | 3.41 ▲0.11 | 46.27 ▼6.41 |
Posts /wp-admin/edit.php | 3.52 ▲0.17 | 50.62 ▲6.16 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 95.27 ▲1.67 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 35.93 ▲1.88 |
Server storage [IO: ▲1.55MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 149 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Klarna Payments for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲34 | 14.29 ▼0.05 | 1.62 ▲0.02 | 40.07 ▼5.23 |
Dashboard /wp-admin | 2,198 ▲21 | 5.51 ▼0.14 | 89.12 ▼12.41 | 39.61 ▼5.73 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 1.96 ▲0.02 | 39.97 ▲2.24 | 37.07 ▲3.12 |
Add New Post /wp-admin/post-new.php | 1,532 ▲6 | 23.17 ▼0.00 | 678.88 ▲41.96 | 54.18 ▲4.02 |
Media Library /wp-admin/upload.php | 1,409 ▲6 | 4.17 ▼0.01 | 100.24 ▲4.69 | 43.50 ▲2.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% 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
- 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/klarna-payments-for-woocommerce/classes/class-kp-settings-saved.php:33
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\Base' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/OrderData.php:15
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\OrderLineData' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Cart/CartLineItem.php:13
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\OrderLineData' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Order/OrderLine.php:13
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\Order\\OrderLine' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Order/OrderLineShipping.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function kp_is_order_pay_page() in wp-content/plugins/klarna-payments-for-woocommerce/templates/klarna-payments-categories.php:7
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\OrderData' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Order/Order.php:15
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\CustomerData' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/StoreApi/StoreApiCustomer.php:15
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\Order\\OrderLine' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Order/OrderLineFee.php:11
- > PHP Fatal error
Uncaught Error: Class 'Krokedil\\WooCommerce\\CustomerData' not found in wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/woocommerce/src/Order/OrderCustomer.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
- Screenshots: Please describe screenshot #1 in klarna-payments-for-woocommerce/assets to your readme.txt
klarna-payments-for-woocommerce/klarna-payments-for-woocommerce.php 92% from 13 tests
The primary PHP file in "Klarna Payments for WooCommerce" version 3.2.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.6.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected9,894 lines of code in 121 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 71 | 1,551 | 4,863 | 6,200 |
PO File | 10 | 560 | 1,330 | 1,525 |
SVG | 26 | 56 | 0 | 857 |
JavaScript | 6 | 97 | 126 | 585 |
CSS | 4 | 104 | 38 | 576 |
JSON | 1 | 0 | 0 | 94 |
Markdown | 2 | 37 | 0 | 53 |
Sass | 1 | 0 | 0 | 4 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 10.26 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 58.00 |
Average method complexity | 1.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 61 | |
▷ Abstract classes | 8 | 13.11% |
▷ Concrete classes | 53 | 86.89% |
▷ Final classes | 0 | 0.00% |
Methods | 653 | |
▷ Static methods | 71 | 10.87% |
▷ Public methods | 601 | 92.04% |
▷ Protected methods | 19 | 2.91% |
▷ Private methods | 33 | 5.05% |
Functions | 24 | |
▷ Named functions | 17 | 70.83% |
▷ Anonymous functions | 7 | 29.17% |
Constants | 10 | |
▷ Global constants | 6 | 60.00% |
▷ Class constants | 4 | 40.00% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/klarna_logo_black.png | 86.90KB | 22.92KB | ▼ 73.63% |
assets/img/icon_slice_it.png | 6.58KB | 3.06KB | ▼ 53.52% |
assets/img/icon_pay_now.png | 5.95KB | 3.23KB | ▼ 45.66% |
assets/img/klarna_logo_white.png | 90.49KB | 22.92KB | ▼ 74.68% |
assets/img/klarna_icons.png | 35.59KB | 10.30KB | ▼ 71.05% |