Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.77MB] [CPU: ▼5.45ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Amazon Pay
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.25 ▲0.79 | 39.91 ▼0.57 |
Dashboard /wp-admin | 4.09 ▲0.74 | 46.43 ▼12.98 |
Posts /wp-admin/edit.php | 4.14 ▲0.78 | 50.72 ▼3.67 |
Add New Post /wp-admin/post-new.php | 6.67 ▲0.78 | 93.19 ▼4.59 |
Media Library /wp-admin/upload.php | 4.01 ▲0.78 | 39.06 ▲6.74 |
Server storage [IO: ▲4.96MB] [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: 498 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
woocommerce_amazon_payments_new_install |
Browser metrics Passed 4 tests
WooCommerce Amazon Pay: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.34 ▲0.18 | 1.81 ▲0.10 | 41.32 ▼0.55 |
Dashboard /wp-admin | 2,189 ▲15 | 5.63 ▲0.05 | 93.74 ▲6.05 | 40.93 ▲0.71 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.04 ▲0.01 | 40.78 ▲0.13 | 33.34 ▼5.91 |
Add New Post /wp-admin/post-new.php | 1,526 ▼3 | 23.01 ▼0.58 | 639.35 ▲42.22 | 53.14 ▼0.58 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.17 ▼0.02 | 95.56 ▼6.46 | 43.90 ▲0.35 |
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
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- woocommerce_amazon_payments_new_install
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
Almost there! Just fix the following items
- 185× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\PHP' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php:23
- > PHP Fatal error
Uncaught Error: Class 'ParagonIE\\ConstantTime\\Base32' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/paragonie/constant_time_encoding/src/Base32Hex.php:34
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160r1.php:19
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\JWK' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/JWK.php:25
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS1' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php:41
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS8' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php:36
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v2.php:19
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\PHP\\Base' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php:24
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\DES' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php:42
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Crypt\\DSA' not found in wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php:24
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 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
Please fix the following attributes:
- Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in woocommerce-gateway-amazon-payments-advanced/assets to your readme.txt
woocommerce-gateway-amazon-payments-advanced/woocommerce-gateway-amazon-payments-advanced.php 85% from 13 tests
The main file in "WooCommerce Amazon Pay" v. 2.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Requires at least: Required version must be the same as the one declared in readme.txt ("5.5" instead of "4.0")
- Description: Please don't use more than 140 characters for the plugin description (currently 491 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin60,555 lines of code in 472 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 425 | 9,363 | 28,078 | 45,365 |
JavaScript | 20 | 4,826 | 2,235 | 13,062 |
Markdown | 9 | 407 | 0 | 1,316 |
JSON | 7 | 0 | 0 | 555 |
CSS | 7 | 23 | 0 | 153 |
SVG | 2 | 0 | 2 | 82 |
XML | 1 | 0 | 0 | 19 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please tend to the following items
- Method cyclomatic complexity should be reduced to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 18.16 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 670.00 |
Average method complexity | 4.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 42 | |
Interfaces | 5 | |
Traits | 4 | |
Classes | 382 | |
▷ Abstract classes | 213 | 55.76% |
▷ Concrete classes | 169 | 44.24% |
▷ Final classes | 25 | 14.79% |
Methods | 2,106 | |
▷ Static methods | 620 | 29.44% |
▷ Public methods | 1,519 | 72.13% |
▷ Protected methods | 310 | 14.72% |
▷ Private methods | 277 | 13.15% |
Functions | 31 | |
▷ Named functions | 4 | 12.90% |
▷ Anonymous functions | 27 | 87.10% |
Constants | 338 | |
▷ Global constants | 6 | 1.78% |
▷ Class constants | 332 | 98.22% |
▷ Public constants | 332 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 1.29MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
build/images/amazon-payments.png | 1.07KB | 0.99KB | ▼ 7.33% |
docs/images/use-amazon-login-app.png | 55.67KB | 20.34KB | ▼ 63.47% |
docs/images/sign-in-from-cart-page.png | 75.89KB | 18.56KB | ▼ 75.54% |
docs/images/subscription-notice.png | 33.93KB | 10.80KB | ▼ 68.17% |
docs/images/amazon-payments-sign-in.png | 314.60KB | 90.07KB | ▼ 71.37% |