Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.27MB] [CPU: ▼5.54ms] Passed 4 tests
Server-side resources used by Cardinity Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.77 ▲0.31 | 38.26 ▼4.08 |
Dashboard /wp-admin | 3.61 ▲0.27 | 47.42 ▼11.69 |
Posts /wp-admin/edit.php | 3.66 ▲0.31 | 48.61 ▲1.57 |
Add New Post /wp-admin/post-new.php | 6.13 ▲0.24 | 89.19 ▼7.95 |
Media Library /wp-admin/upload.php | 3.47 ▲0.24 | 35.11 ▲3.18 |
Server storage [IO: ▲4.19MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 817 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Cardinity Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.12 ▼0.27 | 1.93 ▲0.13 | 41.04 ▼5.86 |
Dashboard /wp-admin | 2,198 ▲20 | 5.61 ▼0.12 | 98.24 ▼21.48 | 41.55 ▼1.98 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.01 ▼0.01 | 40.48 ▲3.13 | 36.14 ▲2.33 |
Add New Post /wp-admin/post-new.php | 1,526 ▼9 | 23.47 ▲0.69 | 620.12 ▲38.49 | 49.67 ▼0.13 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.21 ▲0.01 | 101.04 ▲4.92 | 44.53 ▲3.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- 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 | 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
Please fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/redirect-to-external-checkout.php
- 435× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/translation/Dumper/PhpFileDumper.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/psr/http-message/src/ResponseInterface.php:20
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraint' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/validator/Constraints/Uuid.php:24
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
- > PHP Fatal error
Uncaught Error: Class 'PhpSpec\\ObjectBehavior' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/cardinity/cardinity-sdk-php/spec/Method/VoidPayment/GetSpec.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Validator\\Exception\\ExceptionInterface' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/validator/Exception/OutOfBoundsException.php:19
- > PHP Notice
Undefined index: amount in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/redirect-to-external-checkout.php on line 12
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraint' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/validator/Constraints/Isbn.php:25
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/translation/Tests/IntervalTest.php:17
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual' not found in wp-content/plugins/cardinity-free-payment-gateway-for-woocommerce/vendor/symfony/validator/Constraints/NegativeOrZero.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: payments, payment gateway, cardinity, woocommerce, cardinity checkout...
cardinity-free-payment-gateway-for-woocommerce/class-wc-gateway-cardinity.php 92% from 13 tests
The entry point to "Cardinity Payment Gateway for WooCommerce" version 3.2.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cardinity-free-payment-gateway-for-woocommerce.php" instead of "class-wc-gateway-cardinity.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin86,369 lines of code in 748 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 593 | 8,226 | 17,166 | 52,937 |
XML | 74 | 8 | 3 | 21,585 |
XSD | 5 | 117 | 76 | 5,133 |
Markdown | 29 | 1,297 | 0 | 4,419 |
JSON | 25 | 0 | 0 | 2,087 |
YAML | 10 | 32 | 0 | 120 |
PO File | 6 | 7 | 0 | 37 |
reStructuredText | 1 | 32 | 60 | 18 |
Dockerfile | 1 | 8 | 0 | 10 |
Qt Linguist | 1 | 0 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
Bourne Shell | 1 | 2 | 0 | 3 |
INI | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 8.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 2.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 78 | |
Interfaces | 57 | |
Traits | 6 | |
Classes | 486 | |
▷ Abstract classes | 19 | 3.91% |
▷ Concrete classes | 467 | 96.09% |
▷ Final classes | 32 | 6.85% |
Methods | 2,511 | |
▷ Static methods | 250 | 9.96% |
▷ Public methods | 2,089 | 83.19% |
▷ Protected methods | 132 | 5.26% |
▷ Private methods | 290 | 11.55% |
Functions | 315 | |
▷ Named functions | 194 | 61.59% |
▷ Anonymous functions | 121 | 38.41% |
Constants | 430 | |
▷ Global constants | 88 | 20.47% |
▷ Class constants | 342 | 79.53% |
▷ Public constants | 332 | 97.08% |
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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/cardinity.png | 3.68KB | 2.24KB | ▼ 38.99% |