Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼142.36ms] Passed 4 tests
This is a short check of server-side resources used by NMI Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.00 | 38.75 ▲1.44 |
Dashboard /wp-admin | 3.06 ▲0.01 | 57.65 ▲12.05 |
Posts /wp-admin/edit.php | 3.11 ▲0.00 | 50.37 ▼0.71 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 102.06 ▼570.67 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 35.30 ▲0.51 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by NMI Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲107 | 16.15 ▲0.60 | 9.90 ▼0.96 | 60.72 ▲7.94 |
Dashboard /wp-admin | 2,973 ▲42 | 6.10 ▼0.07 | 144.87 ▼10.22 | 125.05 ▲5.96 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▲0.00 | 76.44 ▲4.02 | 99.02 ▲14.51 |
Add New Post /wp-admin/post-new.php | 1,676 ▼7 | 18.86 ▲0.13 | 395.01 ▲7.36 | 120.07 ▲5.11 |
Media Library /wp-admin/upload.php | 1,807 ▼3 | 5.05 ▲0.03 | 166.25 ▲4.36 | 129.56 ▲0.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables
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
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/nmi-payment-gateway-for-woocommerce/includes/NMI_Payment_Gateway_CC.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
- Screenshots: Add images for these screenshots: #1 (woo-nmi-payment-gateway-screenshot-1), #2 (woo-nmi-payment-gateway-screenshot-2), #3 (woo-nmi-payment-gateway-screenshot-3)
nmi-payment-gateway-for-woocommerce/woo-nmi-payment-gateway.php 85% from 13 tests
"NMI Payment Gateway for WooCommerce" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 ("nmi-payment-gateway-for-woocommerce.php" instead of "woo-nmi-payment-gateway.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,042 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 319 | 251 | 1,042 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 89.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 174.00 |
Average method complexity | 7.52 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 99.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 3 | 11.11% |
▷ Public methods | 20 | 74.07% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 25.93% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/card-visa.png | 4.73KB | 1.66KB | ▼ 64.98% |
assets/images/card-dc.png | 6.16KB | 1.85KB | ▼ 70.00% |
assets/images/card-amex.png | 4.45KB | 1.65KB | ▼ 62.79% |
assets/images/card-disc.png | 4.49KB | 1.47KB | ▼ 67.30% |
assets/images/card-jcb.png | 5.54KB | 1.72KB | ▼ 69.02% |