Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.28MB] [CPU: ▲0.21ms] Passed 4 tests
An overview of server-side resources used by AltaPay for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.76 ▲0.29 | 43.00 ▲6.66 |
Dashboard /wp-admin | 3.59 ▲0.28 | 47.82 ▲0.66 |
Posts /wp-admin/edit.php | 3.70 ▲0.34 | 51.16 ▲2.86 |
Add New Post /wp-admin/post-new.php | 6.17 ▲0.28 | 93.96 ▼6.61 |
Media Library /wp-admin/upload.php | 3.51 ▲0.28 | 36.00 ▲3.92 |
Server storage [IO: ▲3.41MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 557 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_altapayCreditCardDetails |
New WordPress options |
---|
altapay_cc_form_styling |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for AltaPay for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.67 ▲0.26 | 1.74 ▼0.00 | 43.10 ▼3.08 |
Dashboard /wp-admin | 2,192 ▲15 | 5.63 ▲0.06 | 91.18 ▼2.91 | 41.47 ▲1.41 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.96 ▼0.12 | 39.63 ▲3.14 | 34.66 ▼0.69 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.18 ▼0.40 | 642.85 ▲5.06 | 58.89 ▲10.80 |
Media Library /wp-admin/upload.php | 1,394 ▼9 | 4.23 ▲0.09 | 98.90 ▼6.89 | 42.70 ▼0.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_altapayCreditCardDetails
- The uninstall procedure has failed, leaving 7 options in the database
- altapay_cc_form_styling
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
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
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/altapay-for-woocommerce/views/tables/capture.blade.php
- > /wp-content/plugins/altapay-for-woocommerce/views/tables/index.blade.php
- > /wp-content/plugins/altapay-for-woocommerce/views/tables/refund.blade.php
- > /wp-content/plugins/altapay-for-woocommerce/views/tables/creditCard.blade.php
- 181× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\Response\\ReservationOfFixedAmountResponse' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Response/ChargeSubscriptionResponse.php:26
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\Response\\AbstractResponse' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Response/Embeds/CustomerInfo.php:28
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\AbstractApi' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Api/Others/QueryGiftcard.php:42
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/altapay-for-woocommerce/vendor/symfony/options-resolver/Exception/AccessException.php:20
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/altapay-for-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/altapay-for-woocommerce/vendor/symfony/options-resolver/Tests/Debug/OptionsResolverIntrospectorTest.php:19
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\AbstractApi' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Api/Test/TestConnection.php:37
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\Exceptions\\Exception' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Exceptions/AuthenticationRequiredException.php:26
- > PHP Fatal error
Uncaught Error: Class 'Altapay\\Response\\AbstractResponse' not found in wp-content/plugins/altapay-for-woocommerce/vendor/altapay/api-php/src/Response/InvoiceTextResponse.php:29
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/altapay-for-woocommerce/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php:19
- > 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 93% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: gateway, payments, woocommerce, payment card industry, altapay
altapay-for-woocommerce/altapay.php 85% from 13 tests
The entry point to "AltaPay for WooCommerce" version 3.5.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("altapay-for-woocommerce.php" instead of "altapay.php")
- Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.9.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin58,919 lines of code in 471 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 352 | 6,445 | 18,730 | 47,697 |
Markdown | 74 | 2,448 | 0 | 7,257 |
JSON | 26 | 0 | 0 | 2,231 |
Smarty | 1 | 99 | 87 | 593 |
Blade | 5 | 43 | 4 | 578 |
JavaScript | 4 | 24 | 48 | 382 |
XML | 4 | 13 | 1 | 87 |
YAML | 3 | 22 | 4 | 75 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 11.81 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 354.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 50 | |
Interfaces | 38 | |
Traits | 26 | |
Classes | 250 | |
▷ Abstract classes | 4 | 1.60% |
▷ Concrete classes | 246 | 98.40% |
▷ Final classes | 46 | 18.70% |
Methods | 2,289 | |
▷ Static methods | 243 | 10.62% |
▷ Public methods | 1,649 | 72.04% |
▷ Protected methods | 470 | 20.53% |
▷ Private methods | 170 | 7.43% |
Functions | 385 | |
▷ Named functions | 117 | 30.39% |
▷ Anonymous functions | 268 | 69.61% |
Constants | 227 | |
▷ Global constants | 51 | 22.47% |
▷ Class constants | 176 | 77.53% |
▷ Public constants | 164 | 93.18% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
33 PNG files occupy 0.74MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/payment_icons/elv_giropay.png | 6.90KB | 2.97KB | ▼ 57.00% |
assets/images/payment_icons/giftcard.png | 7.77KB | 3.38KB | ▼ 56.47% |
assets/images/screenshot-4.png | 133.30KB | 35.42KB | ▼ 73.42% |
assets/images/payment_icons/ideal.png | 22.48KB | 8.26KB | ▼ 63.26% |
assets/images/payment_icons/creditcard.png | 6.60KB | 2.92KB | ▼ 55.75% |