Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/postpay/postpay.php+64
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.96MB] [CPU: ▼56.94ms] Passed 4 tests
Server-side resources used by WooCommerce Postpay Payment Gateway
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.44 | 6.21 ▼37.52 |
Dashboard /wp-admin | 2.05 ▼1.26 | 6.92 ▼44.56 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 6.37 ▼43.93 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.97 ▼101.75 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 5.07 ▼31.79 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
WooCommerce Postpay Payment Gateway: an overview of browser usage
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.38 | 1.69 ▼0.43 | 44.57 ▲3.02 |
Dashboard /wp-admin | 2,198 ▲21 | 5.64 ▲0.04 | 83.69 ▼8.61 | 39.92 ▼4.23 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.02 ▲0.03 | 35.88 ▲0.88 | 35.64 ▼1.18 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 22.93 ▼0.77 | 642.41 ▼41.94 | 49.41 ▼4.43 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.22 ▲0.15 | 96.75 ▼7.02 | 42.76 ▼2.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/postpay/postpay.php+64
Trying to access array offset on value of type bool
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
Please fix the following
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Postpay\\Exceptions\\ApiException' not found in wp-content/plugins/postpay/vendor/postpay/postpay-php/src/Exceptions/RESTfulException.php:7
- > PHP Fatal error
Uncaught Error: Class 'Postpay\\Exceptions\\PostpayException' not found in wp-content/plugins/postpay/vendor/postpay/postpay-php/src/Exceptions/ApiException.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Postpay\\HttpClients\\ClientInterface' not found in wp-content/plugins/postpay/vendor/postpay/postpay-php/src/HttpClients/CurlClient.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Postpay\\HttpClients\\ClientInterface' not found in wp-content/plugins/postpay/vendor/postpay/postpay-php/src/HttpClients/GuzzleClient.php:13
- > PHP Fatal error
Uncaught Error: Class 'Postpay\\Exceptions\\ApiException' not found in wp-content/plugins/postpay/vendor/postpay/postpay-php/src/Exceptions/GraphQLException.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: payment, postpay, wordpress, woocommerce, gateway
postpay/postpay.php Passed 13 tests
The main PHP file in "WooCommerce Postpay Payment Gateway" ver. 0.2.3 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Buy now and pay later with zero interest and zero fees.
Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin2,236 lines of code in 51 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 44 | 374 | 1,147 | 1,791 |
JSON | 2 | 0 | 0 | 254 |
PO File | 1 | 58 | 95 | 137 |
Markdown | 1 | 12 | 0 | 24 |
reStructuredText | 1 | 12 | 0 | 20 |
JavaScript | 2 | 2 | 8 | 10 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 4.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 1.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 32 | |
▷ Abstract classes | 2 | 6.25% |
▷ Concrete classes | 30 | 93.75% |
▷ Final classes | 2 | 6.67% |
Methods | 136 | |
▷ Static methods | 23 | 16.91% |
▷ Public methods | 133 | 97.79% |
▷ Protected methods | 1 | 0.74% |
▷ Private methods | 2 | 1.47% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 21 | |
▷ Global constants | 4 | 19.05% |
▷ Class constants | 17 | 80.95% |
▷ Public constants | 17 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/postpay-pay-now.png | 2.09KB | 1.67KB | ▼ 20.00% |
assets/images/postpay-dark.png | 4.07KB | 1.83KB | ▼ 55.00% |
assets/images/postpay-light.png | 4.14KB | 1.82KB | ▼ 55.97% |