Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.14MB] [CPU: ▼3.58ms] Passed 4 tests
This is a short check of server-side resources used by SagePay Direct Gateway for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.61 ▲0.14 | 42.58 ▲3.67 |
Dashboard /wp-admin | 3.45 ▲0.15 | 54.21 ▲2.36 |
Posts /wp-admin/edit.php | 3.56 ▲0.21 | 51.65 ▼4.09 |
Add New Post /wp-admin/post-new.php | 6.03 ▲0.14 | 89.71 ▼11.90 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 37.78 ▼0.69 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for SagePay Direct Gateway for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.61 ▲0.02 | 1.66 ▼0.10 | 41.09 ▼1.61 |
Dashboard /wp-admin | 2,198 ▲21 | 5.60 ▼0.01 | 95.63 ▲2.64 | 40.99 ▼1.20 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.03 ▼0.10 | 40.72 ▼2.87 | 36.61 ▼2.03 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.45 ▲0.26 | 669.92 ▲5.60 | 52.32 ▼0.67 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.25 ▲0.03 | 98.37 ▼6.84 | 43.55 ▼4.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sagepay-direct-gateway-for-woocommerce/sagepaydirect.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: payment gateway, wordpress, sagepay go, ecommerce, woocommerce...
sagepay-direct-gateway-for-woocommerce/sagepaydirect.php 69% from 13 tests
The primary PHP file in "SagePay Direct Gateway for WooCommerce" version 1.3.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "4.5")
- Main file name: The principal plugin file should be the same as the plugin slug ("sagepay-direct-gateway-for-woocommerce.php" instead of "sagepaydirect.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Domain Path: The domain path folder was not found ("/lang/")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected730 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 108 | 86 | 730 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 123.00 |
▷ Minimum class complexity | 123.00 |
▷ Maximum class complexity | 123.00 |
Average method complexity | 7.42 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 51.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 19 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 11 | 57.89% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 42.11% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.11MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/card-amex.png | 4.45KB | 1.65KB | ▼ 62.79% |
images/card-maestro.png | 16.76KB | 1.79KB | ▼ 89.31% |
images/card-jcb.png | 5.54KB | 1.72KB | ▼ 69.02% |
images/card-delta.png | 19.25KB | 2.16KB | ▼ 88.76% |
images/card-mc.png | 5.42KB | 1.77KB | ▼ 67.41% |