Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼8.43ms] Passed 4 tests
This is a short check of server-side resources used by OnBuy Integration for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.91 ▼2.43 |
Dashboard /wp-admin | 3.31 ▼0.04 | 48.74 ▼17.30 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.73 ▼3.78 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 85.79 ▼10.20 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.39 ▲3.98 |
Server storage [IO: ▲0.71MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 58 new files
Database: 3 new tables, 6 new options
New tables |
---|
wp_ced_onbuy_accounts |
wp_ced_onbuy_profiles |
wp_ced_onbuy_queue |
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by OnBuy Integration for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.24 ▼0.13 | 1.85 ▲0.17 | 41.91 ▲3.33 |
Dashboard /wp-admin | 2,198 ▲21 | 5.61 ▼0.06 | 84.78 ▼15.33 | 39.34 ▼3.63 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.98 ▼0.04 | 32.69 ▼8.96 | 36.81 ▲0.50 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.01 ▲1.92 | 686.89 ▲76.53 | 66.33 ▲12.42 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.20 ▼0.05 | 103.57 ▲3.20 | 44.95 ▼2.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 3 tables in the database
- wp_ced_onbuy_accounts
- wp_ced_onbuy_profiles
- wp_ced_onbuy_queue
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
The following issues need your attention
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cedcommerce-onbuy-integration/admin/partials/onbuy-integration-for-woocommerce-admin-display.php
- > /wp-content/plugins/cedcommerce-onbuy-integration/public/partials/onbuy-integration-for-woocommerce-public-display.php
- 3× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/cedcommerce-onbuy-integration/admin/partials/ced-onbuy-product-metakeys-attributes.php:9
- > PHP Notice
Undefined variable: product_name in wp-content/plugins/cedcommerce-onbuy-integration/admin/partials/ced-onbuy-product-metakeys-attributes.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/cedcommerce-onbuy-integration/admin/partials/ced-onbuy-metakeys-list.php:5
- > 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 83% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
- Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #5, #6, #7, #8, #9 in cedcommerce-onbuy-integration/assets to your readme.txt
cedcommerce-onbuy-integration/onbuy-integration-for-woocommerce.php 69% from 13 tests
The main file in "OnBuy Integration for WooCommerce" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("cedcommerce-onbuy-integration.php" instead of "onbuy-integration-for-woocommerce.php")
- Description: The description should be shorter than 140 characters (currently 144 characters long)
- Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.0")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected12,050 lines of code in 44 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 36 | 1,205 | 1,596 | 9,046 |
CSS | 3 | 337 | 42 | 1,634 |
JavaScript | 3 | 107 | 63 | 1,031 |
JSON | 1 | 0 | 0 | 332 |
XML | 1 | 0 | 0 | 7 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 207)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 83.22 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 676.00 |
Average method complexity | 7.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 207.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 18 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 18 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 235 | |
▷ Static methods | 7 | 2.98% |
▷ Public methods | 229 | 97.45% |
▷ Protected methods | 1 | 0.43% |
▷ Private methods | 5 | 2.13% |
Functions | 20 | |
▷ Named functions | 20 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 16 | |
▷ Global constants | 16 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/icon.png | 9.15KB | 0.80KB | ▼ 91.21% |
admin/images/ced-logo.png | 1.64KB | 0.78KB | ▼ 52.45% |
admin/images/logo.png | 0.93KB | 0.87KB | ▼ 6.90% |
(invalid) admin/images/onbuy-card.png | 9.32KB | 0.00KB | ▼ 100.00% |
admin/images/logo1.png | 0.41KB | 0.42KB | 0.00% |