Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.87MB] [CPU: ▼130.54ms] Passed 4 tests
Server-side resources used by WP Commerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.08 ▲0.36 | 39.97 ▲16.19 |
Dashboard /wp-admin | 4.25 ▲1.20 | 65.36 ▲16.97 |
Posts /wp-admin/edit.php | 4.32 ▲1.21 | 57.47 ▲13.01 |
Add New Post /wp-admin/post-new.php | 6.14 ▲0.71 | 95.78 ▼555.42 |
Media Library /wp-admin/upload.php | 4.26 ▲1.26 | 38.12 ▲4.08 |
WP Commerce /wp-admin/admin.php?page=wp-commerce-settings | 4.24 | 59.46 |
Extensions /wp-admin/admin.php?page=wp-commerce-extensions | 4.24 | 42.45 |
Dashboard /wp-admin/admin.php?page=wp-commerce-dashboard | 4.24 | 38.74 |
Orders /wp-admin/edit.php?post_type=orders | 4.30 | 48.62 |
Server storage [IO: ▲7.07MB] [DB: ▲0.13MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,307 new files
Database: 7 new tables, 2 new options
New tables |
---|
wp_wpcommerce_order_items |
wp_wpcommerce_log |
wp_wpcommerce_customers |
wp_wpcommerce_payment_tokens |
wp_wpcommerce_customer_meta |
wp_wpcommerce_sessions |
wp_wpcommerce_payment_tokenmeta |
New WordPress options |
---|
_wpcommerce_settings |
wpcm_user_data |
Browser metrics Passed 4 tests
Checking browser requirements for WP Commerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,310 ▲714 | 22.37 ▲6.56 | 9.35 ▲0.22 | 50.91 ▲2.52 |
Dashboard /wp-admin | 3,551 ▲617 | 11.58 ▲5.66 | 233.16 ▲92.61 | 151.92 ▲29.99 |
Posts /wp-admin/edit.php | 3,237 ▲498 | 8.30 ▲5.62 | 135.94 ▲66.25 | 116.31 ▲24.81 |
Add New Post /wp-admin/post-new.php | 3,921 ▲2,340 | 23.42 ▲5.32 | 458.50 ▲54.53 | 116.73 ▼2.24 |
Media Library /wp-admin/upload.php | 2,063 ▲256 | 8.90 ▲3.89 | 175.69 ▲20.04 | 147.38 ▲19.17 |
WP Commerce /wp-admin/admin.php?page=wp-commerce-settings | 5,339 | 19.69 | 191.72 | 148.81 |
Extensions /wp-admin/admin.php?page=wp-commerce-extensions | 1,921 | 10.43 | 176.91 | 107.19 |
Dashboard /wp-admin/admin.php?page=wp-commerce-dashboard | 2,041 | 11.56 | 189.66 | 134.56 |
Orders /wp-admin/edit.php?post_type=orders | 1,973 | 8.29 | 136.02 | 93.93 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.13MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 tables in the database
- wp_wpcommerce_sessions
- wp_wpcommerce_payment_tokenmeta
- wp_wpcommerce_log
- wp_wpcommerce_customer_meta
- wp_wpcommerce_customers
- wp_wpcommerce_order_items
- wp_wpcommerce_payment_tokens
- This plugin did not uninstall successfully, leaving 2 options in the database
- wpcm_user_data
- _wpcommerce_settings
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
- 9× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/webinane-commerce/templates/checkout/gateways.php
- > /wp-content/plugins/webinane-commerce/templates/admin/settings.php
- > /wp-content/plugins/webinane-commerce/vendor/illuminate/pagination/resources/views/simple-default.blade.php
- > /wp-content/plugins/webinane-commerce/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php
- > /wp-content/plugins/webinane-commerce/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php
- > /wp-content/plugins/webinane-commerce/templates/emails/layouts/template3.php
- > /wp-content/plugins/webinane-commerce/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php
- > /wp-content/plugins/webinane-commerce/templates/emails/layouts/template2.php
- > /wp-content/plugins/webinane-commerce/vendor/illuminate/pagination/resources/views/default.blade.php
- 695× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/webinane-commerce/templates/orders/success-page.php:4
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Core\\PPXmlMessage' not found in wp-content/plugins/webinane-commerce/vendor/paypal/merchant-sdk-php/lib/PayPal/EBLBaseComponents/EnhancedDataType.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function wpcm_get_cart_content() in wp-content/plugins/webinane-commerce/templates/checkout/checkout.php:2
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Handler\\PPGenericServiceHandler' not found in wp-content/plugins/webinane-commerce/vendor/paypal/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php:15
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Core\\PPXmlMessage' not found in wp-content/plugins/webinane-commerce/vendor/paypal/merchant-sdk-php/lib/PayPal/EBLBaseComponents/ExecuteCheckoutOperationsRequestDetailsType.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/webinane-commerce/templates/global/add-to-cart-button.php:17
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Core\\PPXmlMessage' not found in wp-content/plugins/webinane-commerce/vendor/paypal/merchant-sdk-php/lib/PayPal/EBLBaseComponents/IncentiveDetailsType.php:10
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\EBLBaseComponents\\AbstractRequestType' not found in wp-content/plugins/webinane-commerce/vendor/paypal/merchant-sdk-php/lib/PayPal/PayPalAPI/DoNonReferencedCreditRequestType.php:9
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Core\\PPXmlMessage' not found in wp-content/plugins/webinane-commerce/vendor/paypal/merchant-sdk-php/lib/PayPal/PayPalAPI/BMButtonSearchReq.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Illuminate\\Contracts\\Auth\\Guard' not found in wp-content/plugins/webinane-commerce/vendor/illuminate/contracts/Auth/StatefulGuard.php:5
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=wp-commerce-settings
- > Network (severe)
index.php/wp-json/webinane-commerce/v1/countries//states - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: paypal, ecommerce, payment gateways
webinane-commerce/webinane-commerce.php Passed 13 tests
The main PHP file in "WP Commerce" ver. 2.2.3 adds more information about the plugin and also serves as the entry point for this plugin
26 characters long description:
eCommerce WordPress plugin
Code Analysis 97% from 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
There were no executable files found in this plugin100,099 lines of code in 1,225 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,000 | 16,187 | 57,336 | 66,756 |
CSS | 13 | 1,136 | 50 | 10,741 |
JavaScript | 24 | 1,200 | 1,567 | 10,172 |
JSON | 161 | 5 | 0 | 8,302 |
XSD | 3 | 92 | 48 | 2,803 |
Markdown | 9 | 210 | 0 | 497 |
HTML | 2 | 28 | 0 | 411 |
SVG | 4 | 0 | 4 | 180 |
Blade | 5 | 11 | 19 | 136 |
reStructuredText | 1 | 47 | 30 | 48 |
XML | 1 | 0 | 0 | 45 |
YAML | 2 | 0 | 1 | 8 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 139)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 7.46 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 337.00 |
Average method complexity | 2.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 139.00 |
Code structure | ||
---|---|---|
Namespaces | 111 | |
Interfaces | 117 | |
Traits | 52 | |
Classes | 767 | |
▷ Abstract classes | 28 | 3.65% |
▷ Concrete classes | 739 | 96.35% |
▷ Final classes | 3 | 0.41% |
Methods | 5,759 | |
▷ Static methods | 884 | 15.35% |
▷ Public methods | 4,642 | 80.60% |
▷ Protected methods | 978 | 16.98% |
▷ Private methods | 139 | 2.41% |
Functions | 484 | |
▷ Named functions | 156 | 32.23% |
▷ Anonymous functions | 328 | 67.77% |
Constants | 143 | |
▷ Global constants | 16 | 11.19% |
▷ Class constants | 127 | 88.81% |
▷ Public constants | 125 | 98.43% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/ui-icons_fcd113_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
assets/images/ui-bg_gloss-wave_75_2191c0_500x100.png | 5.84KB | 2.74KB | ▼ 53.09% |
assets/images/ui-icons_f7a50d_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
assets/images/icons/fltr-icon2.png | 1.21KB | 0.59KB | ▼ 50.97% |
assets/images/icons/wdgt-icon1.png | 1.07KB | 0.21KB | ▼ 79.89% |