Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.18MB] [CPU: ▼2.54ms] Passed 4 tests
A check of server-side resources used by Ni WooCommerce Cost Of Goods
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.18 | 43.39 ▼1.19 |
Dashboard /wp-admin | 3.50 ▲0.15 | 47.21 ▼11.53 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 52.88 ▲6.64 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.19 | 92.20 ▼0.54 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 36.06 ▲3.11 |
Setting /wp-admin/admin.php?page=ni-cog-setting | 3.42 | 32.11 |
Other plugin /wp-admin/admin.php?page=ni-cog-other-plugin | 3.44 | 34.68 |
Category Stock Value /wp-admin/admin.php?page=ni-category-stock-value | 3.42 | 32.43 |
Top Profit Product /wp-admin/admin.php?page=ni-cog-top-profit-product | 3.42 | 31.41 |
Dashboard /wp-admin/admin.php?page=ni-cost-of-goods | 3.55 | 34.42 |
Profit Report /wp-admin/admin.php?page=ni-cog-report | 3.58 | 33.18 |
Profit Analytical /wp-admin/admin.php?page=ni-cog-analytical-report | 3.43 | 33.54 |
Add Cost Price /wp-admin/admin.php?page=niwoocog-add-cost-price | 3.47 | 44.17 |
Server storage [IO: ▲1.89MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
recovery_mode_email_last_sent |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Ni WooCommerce Cost Of Goods: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,837 ▲75 | 14.34 ▼0.01 | 1.60 ▼0.25 | 41.68 ▼1.68 |
Dashboard /wp-admin | 2,236 ▲56 | 5.47 ▼0.20 | 95.59 ▼3.34 | 40.65 ▲0.07 |
Posts /wp-admin/edit.php | 2,150 ▲47 | 2.03 ▲0.08 | 39.11 ▲0.35 | 36.80 ▲1.74 |
Add New Post /wp-admin/post-new.php | 1,573 ▲47 | 18.47 ▼5.07 | 622.71 ▼26.39 | 66.68 ▲15.77 |
Media Library /wp-admin/upload.php | 1,450 ▲53 | 4.16 ▲0.02 | 96.31 ▼2.76 | 42.33 ▼0.02 |
Setting /wp-admin/admin.php?page=ni-cog-setting | 978 | 1.99 | 27.43 | 43.35 |
Other plugin /wp-admin/admin.php?page=ni-cog-other-plugin | 1,150 | 2.00 | 22.83 | 29.59 |
Category Stock Value /wp-admin/admin.php?page=ni-category-stock-value | 937 | 1.69 | 32.46 | 30.08 |
Top Profit Product /wp-admin/admin.php?page=ni-cog-top-profit-product | 895 | 1.97 | 22.14 | 34.78 |
Dashboard /wp-admin/admin.php?page=ni-cost-of-goods | 878 | 1.63 | 6.58 | 28.99 |
Profit Report /wp-admin/admin.php?page=ni-cog-report | 739 | 1.52 | 6.54 | 17.22 |
Profit Analytical /wp-admin/admin.php?page=ni-cog-analytical-report | 967 | 1.72 | 32.70 | 24.04 |
Add Cost Price /wp-admin/admin.php?page=niwoocog-add-cost-price | 1,042 | 1.69 | 25.06 | 26.70 |
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
- Zombie WordPress options were found after uninstall: 7 options
- widget_theysaidso_widget
- recovery_mode_email_last_sent
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=ni-cost-of-goods
- > Error in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-dashboard.php+73
Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-dashboard.php:73
Stack trace:
#0 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-woocommerce-cost-of-goods-init.php(173): Ni_COG_Dashboard->page_init()
#1 wp-includes/class-wp-hook.php(310): Ni_WooCommerce_Cost_Of_Goods_Init->add_page()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown- > GET request to /wp-admin/admin.php?page=ni-cog-report
- > Error in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-sales-report.php+215
Uncaught Error: Class 'WC_Countries' not found in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-sales-report.php:215
Stack trace:
#0 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-sales-report.php(206): Ni_COG_Sales_Report->get_countries()
#1 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-sales-report.php(18): Ni_COG_Sales_Report->get_order_country()
#2 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-woocommerce-cost-of-goods-init.php(167): Ni_COG_Sales_Report->page_init()
#3 wp-includes/class-wp-hook.php(310): Ni_WooCommerce_Cost_Of_Goods_Init->add_page()
#4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#5 wp-includes/plugin.php(517): WP_Hook->do_action()
#6 wp-admin/admin.php(259): do_action()
#7 {main}
thrown- > GET request to /wp-admin/admin.php?page=ni-cog-analytical-report
- > Error in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-analytical-report.php+255
Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-analytical-report.php:255
Stack trace:
#0 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-cog-analytical-report.php(140): Ni_COG_Analytical_Report->get_tables()
#1 wp-content/plugins/ni-woocommerce-cost-of-goods/include/ni-woocommerce-cost-of-goods-init.php(257): Ni_COG_Analytical_Report->page_ajax()
#2 wp-includes/class-wp-hook.php(310): Ni_WooCommerce_Cost_Of_Goods_Init->ajax_ni_cog_action()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/admin-ajax.php(188): do_action()
#6 {main}
thrown
SRP Passed 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
Congratulations! This plugin passed the SRP test
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
- > GET request to /wp-admin/admin.php?page=ni-cog-analytical-report
- > Network (severe)
wp-admin/admin-ajax.php?sub_action=ni_cog_analytical_report&action=ni_cog_action - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Optimizations
Plugin configuration 90% 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: These screenshots do not have images: #1 (Sales analysis count and value), #2 (Profit analysis count and value), #3 (Top 5 profit product), #4 (Top 5 profit customer), #5 (Profit report search and filter), #6 (Product profit grid or table), #7 (Product profit report), #8 (Today, yesterday and last 7 days profit product), #9 (Add cost price to product), #10 (Cost of goods setting), #11 (Product additional columns), #12 (Top 5 profit category), #13 (Current year vs previous year profit)
ni-woocommerce-cost-of-goods/ni-woocommerce-cost-of-goods.php 85% from 13 tests
The principal PHP file in "Ni WooCommerce Cost Of Goods" v. 3.2.3 is loaded by WordPress automatically on each request
You should first fix the following items:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Description: Please keep the plugin description shorter than 140 characters (currently 295 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected8,982 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 703 | 144 | 3,342 |
SVG | 1 | 0 | 0 | 2,671 |
CSS | 5 | 53 | 49 | 2,658 |
PO File | 1 | 99 | 115 | 220 |
JavaScript | 4 | 27 | 10 | 91 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 27.21 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 106.00 |
Average method complexity | 4.34 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 40.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 14 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 14 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 110 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 109 | 99.09% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 0.91% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.46MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-12.png | 20.27KB | 7.48KB | ▼ 63.09% |
screenshot-13.png | 23.42KB | 14.23KB | ▼ 39.24% |
screenshot-11.png | 76.67KB | 24.52KB | ▼ 68.03% |
screenshot-6.png | 34.14KB | 11.87KB | ▼ 65.23% |
screenshot-5.png | 18.16KB | 6.31KB | ▼ 65.23% |