Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼6.09ms] Passed 4 tests
Analyzing server-side resources used by Klarna Checkout for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 37.33 ▲0.62 |
Dashboard /wp-admin | 3.31 ▼0.03 | 44.69 ▼11.50 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 44.48 ▲1.01 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 77.70 ▼11.51 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.25 ▼1.97 |
Server storage [IO: ▲1.22MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 88 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Klarna Checkout for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▲0.00 | 1.60 ▼0.38 | 38.23 ▼0.19 |
Dashboard /wp-admin | 2,198 ▲20 | 5.61 ▼0.22 | 86.77 ▼13.00 | 40.15 ▲0.07 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.97 ▼0.02 | 40.46 ▲5.65 | 36.83 ▲1.55 |
Add New Post /wp-admin/post-new.php | 1,537 ▲1 | 18.17 ▼4.92 | 614.82 ▼70.85 | 77.49 ▲17.74 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.20 ▲0.07 | 95.18 ▼14.26 | 44.46 ▼2.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- 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
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 3× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/klarna-checkout-for-woocommerce/templates/klarna-checkout.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/klarna-checkout-for-woocommerce/classes/class-kco-settings-saved.php:35
- > PHP Fatal error
Uncaught Error: Call to undefined function WC() in wp-content/plugins/klarna-checkout-for-woocommerce/templates/klarna-checkout-order-received.php:10
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 93% 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
These attributes need to be fixed:
- Screenshots: Please a description for screenshot #1 in klarna-checkout-for-woocommerce/assets to your readme.txt
klarna-checkout-for-woocommerce/klarna-checkout-for-woocommerce.php 92% from 13 tests
Analyzing the main PHP file in "Klarna Checkout for WooCommerce" version 2.11.5
You should first fix the following items:
- Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.0.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin10,173 lines of code in 65 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 43 | 984 | 2,573 | 5,446 |
PO File | 10 | 1,310 | 1,510 | 3,415 |
CSS | 4 | 126 | 50 | 661 |
JavaScript | 5 | 86 | 93 | 600 |
SVG | 2 | 0 | 0 | 46 |
JSON | 1 | 0 | 0 | 5 |
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.44 |
Average class complexity | 19.41 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 89.00 |
Average method complexity | 3.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 39 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 39 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 279 | |
▷ Static methods | 39 | 13.98% |
▷ Public methods | 241 | 86.38% |
▷ Protected methods | 16 | 5.73% |
▷ Private methods | 22 | 7.89% |
Functions | 25 | |
▷ Named functions | 24 | 96.00% |
▷ Anonymous functions | 1 | 4.00% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/icon_slice_it.png | 6.58KB | 3.06KB | ▼ 53.52% |
assets/img/klarna_logo_white.png | 90.49KB | 22.92KB | ▼ 74.68% |
assets/img/klarna_icons.png | 35.59KB | 10.30KB | ▼ 71.05% |
assets/img/icon_pay_now.png | 5.95KB | 3.23KB | ▼ 45.66% |
assets/img/icon_pay_later.png | 5.96KB | 3.30KB | ▼ 44.60% |