Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.56ms] Passed 4 tests
An overview of server-side resources used by Gateway for Vantiv on WC
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 35.49 ▼4.81 |
Dashboard /wp-admin | 3.31 ▲0.01 | 45.89 ▼4.75 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.98 ▲1.22 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 86.74 ▼1.87 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 31.82 ▼2.79 |
Server storage [IO: ▲4.72MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 734 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Gateway for Vantiv on WC
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,837 ▲91 | 13.63 ▼0.67 | 8.59 ▲6.77 | 41.14 ▼2.24 |
Dashboard /wp-admin | 2,211 ▲26 | 5.84 ▲0.75 | 106.71 ▼9.84 | 40.28 ▼8.12 |
Posts /wp-admin/edit.php | 2,099 ▲10 | 1.98 ▼0.02 | 39.86 ▲5.00 | 35.72 ▼0.85 |
Add New Post /wp-admin/post-new.php | 1,522 ▲3 | 17.74 ▼5.58 | 677.43 ▼8.89 | 57.26 ▲5.89 |
Media Library /wp-admin/upload.php | 1,399 ▲11 | 4.22 ▼0.01 | 95.74 ▼15.50 | 45.15 ▼3.02 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 6 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 0% 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
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/phpunit/build/assertions.php
- > /wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/cnp/sdk/Setup.php
- 395× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/phpunit/Tests/_files/IncompleteTest.php:2
- > PHP Warning
fgets() expects parameter 1 to be resource, string given in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/cnp/sdk/Setup.php on line 108
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/php-code-coverage/Tests/_files/CoverageNoneTest.php:2
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/phpunit/Tests/Framework/Assert/FunctionsTest.php:57
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestSuite' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite/DataProvider.php:57
- > PHP Warning
fgets() expects parameter 1 to be resource, string given in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/cnp/sdk/Setup.php on line 108
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionTest.php:2
- > PHP Fatal error
Uncaught Error: Class 'cnp\\sdk\\CnpRequest' not found in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/samples/Batch/SampleBatchDriver.php:24
- > PHP Warning
include(): Failed opening 'test1.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/php-token-stream/Tests/_files/source3.php on line 5
- > PHP Fatal error
require_once(): Failed opening required 'PHP/Token/Stream.php' (include_path='.:/usr/share/php') in wp-content/plugins/gateway-for-vantiv-on-wc/vantiv_sdk/vendor/phpunit/php-token-stream/Tests/Token/FunctionTest.php on line 53
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: credit card, woocommerce, vantiv, payment request
gateway-for-vantiv-on-wc/gateway-vantiv-woocommerce.php 92% from 13 tests
The principal PHP file in "Gateway for Vantiv on WC" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gateway-for-vantiv-on-wc.php" instead of "gateway-vantiv-woocommerce.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin70,475 lines of code in 659 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 550 | 11,666 | 37,757 | 58,557 |
XSD | 2 | 331 | 84 | 4,653 |
YAML | 25 | 149 | 89 | 3,253 |
XML | 36 | 93 | 11 | 1,245 |
JSON | 12 | 3 | 0 | 1,066 |
Ant | 4 | 102 | 0 | 678 |
CSS | 4 | 193 | 168 | 519 |
Markdown | 16 | 205 | 0 | 400 |
JavaScript | 9 | 1 | 17 | 61 |
HTML | 1 | 1 | 0 | 43 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
These items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 124)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 12.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 628.00 |
Average method complexity | 3.34 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 124.00 |
Code structure | ||
---|---|---|
Namespaces | 22 | |
Interfaces | 28 | |
Traits | 0 | |
Classes | 582 | |
▷ Abstract classes | 23 | 3.95% |
▷ Concrete classes | 559 | 96.05% |
▷ Final classes | 1 | 0.18% |
Methods | 3,009 | |
▷ Static methods | 347 | 11.53% |
▷ Public methods | 2,670 | 88.73% |
▷ Protected methods | 292 | 9.70% |
▷ Private methods | 47 | 1.56% |
Functions | 194 | |
▷ Named functions | 166 | 85.57% |
▷ Anonymous functions | 28 | 14.43% |
Constants | 258 | |
▷ Global constants | 45 | 17.44% |
▷ Class constants | 213 | 82.56% |
▷ Public constants | 213 | 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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vantiv_sdk/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML/Renderer/Template/img/glyphicons-halflings-white.png | 8.57KB | 9.20KB | 0.00% |
vantiv_sdk/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML/Renderer/Template/img/glyphicons-halflings.png | 12.50KB | 10.35KB | ▼ 17.19% |