Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/svea-checkout-for-woocommerce/inc/Webhook_Handler.php+155
The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.93ms] Passed 4 tests
This is a short check of server-side resources used by Svea Checkout for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.11 ▼0.37 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.34 ▼1.47 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 40.81 ▼5.85 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 79.31 ▼24.02 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.83 ▲2.30 |
Server storage [IO: ▲0.84MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 187 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
svea_checkout_admin_notices |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Svea Checkout for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▲0.01 | 1.81 ▲0.10 | 45.87 ▲2.51 |
Dashboard /wp-admin | 2,192 ▲15 | 5.55 ▼0.07 | 82.74 ▼5.24 | 39.39 ▼2.18 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.06 | 34.67 ▼0.60 | 35.96 ▲4.62 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.04 ▼0.01 | 671.75 ▼0.51 | 52.89 ▼9.18 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.15 ▼0.07 | 93.19 ▼1.48 | 44.45 ▲1.02 |
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
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_theysaidso_widget
- db_upgraded
- svea_checkout_admin_notices
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
- 15× GET requests to PHP files return non-empty strings (only 10 are shown):
- > /wp-content/plugins/svea-checkout-for-woocommerce/templates/backend/log-metabox.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/get-order.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/update-order-row.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/create-order.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/cancel-order.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/get-task.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/cancel-order-amount.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/credit-new-order-row.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/admin/credit-order-amount.php
- > /wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/examples/get-available-part-payment-campaigns.php
- 85× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Tests\\Unit\\TestCase' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/Unit/Validation/Admin/ValidateGetTaskDataTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Implementation\\Admin\\AdminImplementationManager' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/src/Implementation/Admin/GetTask.php:7
- > PHP Warning
include(): Failed opening 'wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Tests\\Unit\\TestCase' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/Unit/Validation/Admin/ValidateCancelOrderDataTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Implementation\\Admin\\AdminImplementationManager' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/src/Implementation/Admin/AddOrderRow.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/Unit/TestCase.php:10
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Tests\\Unit\\TestCase' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/Unit/Validation/Admin/ValidateUpdateOrderRowDataTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Implementation\\ImplementationManager' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/src/Implementation/GetTokenOrder.php:9
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Implementation\\Admin\\AdminImplementationManager' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/src/Implementation/Admin/CancelOrder.php:9
- > PHP Fatal error
Uncaught Error: Class 'Svea\\Checkout\\Tests\\Unit\\TestCase' not found in wp-content/plugins/svea-checkout-for-woocommerce/vendor/sveaekonomi/checkout/tests/Unit/Implementation/Admin/GetTaskTest.php:10
- > PHP Fatal error
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 90% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: svea ekonomi, part payment, invoice, credit card, svea checkout...
svea-checkout-for-woocommerce/svea-checkout-for-woocommerce.php 77% from 13 tests
The main file in "Svea Checkout for WooCommerce" v. 2.5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
- Domain Path: The domain path must begin with a forward slash character ("/languages")
- Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "5.0.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected12,646 lines of code in 173 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 159 | 2,839 | 5,538 | 10,759 |
Markdown | 2 | 377 | 0 | 1,193 |
PO File | 1 | 201 | 265 | 488 |
JSON | 2 | 0 | 0 | 100 |
XML | 3 | 15 | 8 | 78 |
YAML | 1 | 4 | 2 | 23 |
CSS | 3 | 0 | 0 | 3 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 7.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 146.00 |
Average method complexity | 1.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 23 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 122 | |
▷ Abstract classes | 3 | 2.46% |
▷ Concrete classes | 119 | 97.54% |
▷ Final classes | 1 | 0.84% |
Methods | 842 | |
▷ Static methods | 91 | 10.81% |
▷ Public methods | 790 | 93.82% |
▷ Protected methods | 11 | 1.31% |
▷ Private methods | 41 | 4.87% |
Functions | 33 | |
▷ Named functions | 17 | 51.52% |
▷ Anonymous functions | 16 | 48.48% |
Constants | 32 | |
▷ Global constants | 2 | 6.25% |
▷ Class constants | 30 | 93.75% |
▷ Public constants | 27 | 90.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
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 |
vendor/sveaekonomi/checkout/docs/image/flow.png | 16.25KB | 7.42KB | ▼ 54.34% |