Benchmarks
Plugin footprint 83% 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.00MB] [CPU: ▼8.32ms] Passed 4 tests
This is a short check of server-side resources used by Cost of Goods Sold (COGS): Cost & Profit Calculator for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 38.34 ▼4.18 |
Dashboard /wp-admin | 3.31 ▼0.03 | 45.02 ▼15.44 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.02 ▼0.34 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 81.60 ▼8.71 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 32.55 ▼4.94 |
Server storage [IO: ▲0.94MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Cost of Goods Sold (COGS): Cost & Profit Calculator for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.37 ▲0.08 | 1.69 ▼0.13 | 43.44 ▼1.96 |
Dashboard /wp-admin | 2,195 ▲15 | 5.52 ▼0.13 | 85.80 ▼12.18 | 39.65 ▼5.58 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 2.00 ▲0.03 | 34.87 ▼1.05 | 34.86 ▼2.92 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.32 ▲0.05 | 605.95 ▼66.24 | 50.00 ▼2.57 |
Media Library /wp-admin/upload.php | 1,397 ▼0 | 4.21 ▲0.06 | 97.08 ▼7.09 | 41.22 ▼3.45 |
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
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests Passed 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 Passed 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 97% 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
Attributes that require attention:
- Screenshots: Please add images for these screenshots: #1 (Product cost of goods.), #2 (Cost of goods: variable product.), #3 (Cost of goods: variation.), #4 (Order "Cost of Goods" meta box.), #5 (Product bulk edit costs tool.), #6 (Cost of goods columns in "Analytics > Orders" report.)
cost-of-goods-for-woocommerce/cost-of-goods-for-woocommerce.php Passed 13 tests
"Cost of Goods Sold (COGS): Cost & Profit Calculator for WooCommerce" version 3.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Save product purchase costs (cost of goods) in WooCommerce. Beautifully.
Code Analysis Passed 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 plugin11,524 lines of code in 72 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 49 | 944 | 3,613 | 7,547 |
PO File | 3 | 1,354 | 1,824 | 3,227 |
JavaScript | 11 | 44 | 121 | 647 |
JSON | 4 | 0 | 0 | 62 |
CSS | 2 | 5 | 6 | 27 |
Markdown | 1 | 6 | 0 | 9 |
XML | 1 | 0 | 0 | 5 |
Sass | 1 | 0 | 1 | 0 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 21.82 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 218.00 |
Average method complexity | 3.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 79.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 39 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 39 | 100.00% |
▷ Final classes | 1 | 2.56% |
Methods | 332 | |
▷ Static methods | 16 | 4.82% |
▷ Public methods | 309 | 93.07% |
▷ Protected methods | 21 | 6.33% |
▷ Private methods | 2 | 0.60% |
Functions | 28 | |
▷ Named functions | 17 | 60.71% |
▷ Anonymous functions | 11 | 39.29% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin