Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/wc-category-discount/woocommerce-category-discount.php+41
Use of undefined constant RNOC_TEXT_DOMAIN - assumed 'RNOC_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼0.01MB] [CPU: ▼7.27ms] Passed 4 tests
This is a short check of server-side resources used by Category Discounts for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 39.36 ▼2.50 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.87 ▼17.80 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.52 ▼3.70 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 86.40 ▼5.06 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.93 ▲3.19 |
Server storage [IO: ▲1.83MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 180 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Category Discounts for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.33 ▲0.16 | 1.80 ▲0.17 | 41.06 ▲0.45 |
Dashboard /wp-admin | 2,189 ▲11 | 5.57 ▼0.14 | 83.68 ▼20.86 | 35.37 ▼6.08 |
Posts /wp-admin/edit.php | 2,079 ▼21 | 2.00 ▲0.05 | 35.48 ▼2.44 | 32.35 ▼1.04 |
Add New Post /wp-admin/post-new.php | 1,531 ▼7 | 23.01 ▲5.03 | 595.64 ▼42.39 | 91.75 ▼1.03 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.13 ▼0.04 | 98.31 ▼8.44 | 45.45 ▲3.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/apigen/hook-docs.php
- 41× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Radio.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/CMB2_Field.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/init.php:126
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Textarea.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_Oembed.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wc-category-discount/vendor/cmb2/cmb2/includes/types/CMB2_Type_File_Base.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
- Screenshots: These screenshots need descriptions #1, #2, #3 in wc-category-discount/assets to your readme.txt
wc-category-discount/woocommerce-category-discount.php 77% from 13 tests
The principal PHP file in "Category Discounts for WooCommerce" v. 1.0.4 is loaded by WordPress automatically on each request
The following require your attention:
- Requires at least: Required version must match the one declared in readme.txt ("4.4.1" instead of "4.6.1")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("wc-category-discount.php" instead of "woocommerce-category-discount.php")
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
Success! There were no dangerous files found in this plugin22,372 lines of code in 123 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 71 | 2,366 | 6,707 | 8,869 |
CSS | 16 | 1,272 | 1,164 | 5,107 |
JSON | 2 | 0 | 0 | 3,540 |
JavaScript | 15 | 491 | 657 | 2,582 |
Sass | 16 | 300 | 25 | 1,379 |
Markdown | 2 | 214 | 0 | 632 |
PO File | 1 | 115 | 149 | 263 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 21.77 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 198.00 |
Average method complexity | 3.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 64.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 77 | |
▷ Abstract classes | 9 | 11.69% |
▷ Concrete classes | 68 | 88.31% |
▷ Final classes | 0 | 0.00% |
Methods | 626 | |
▷ Static methods | 101 | 16.13% |
▷ Public methods | 525 | 83.87% |
▷ Protected methods | 94 | 15.02% |
▷ Private methods | 7 | 1.12% |
Functions | 42 | |
▷ Named functions | 36 | 85.71% |
▷ Anonymous functions | 6 | 14.29% |
Constants | 15 | |
▷ Global constants | 7 | 46.67% |
▷ Class constants | 8 | 53.33% |
▷ Public constants | 8 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/resize.png | 0.12KB | 0.10KB | ▼ 13.22% |
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/inherit.png | 0.15KB | 0.10KB | ▼ 29.61% |
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/tree-hasnext.png | 0.13KB | 0.09KB | ▼ 31.25% |
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png | 0.10KB | 0.10KB | ▼ 5.71% |
vendor/cmb2/cmb2/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |