Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼0.59ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Custom Product Data Fields
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 38.57 ▼1.83 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.22 ▼5.55 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.97 ▲3.45 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 91.57 ▲2.78 |
Media Library /wp-admin/upload.php | 3.24 ▲0.00 | 33.45 ▲2.23 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
WooCommerce Custom Product Data Fields: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.61 ▼0.79 | 1.65 ▼0.32 | 42.32 ▼2.55 |
Dashboard /wp-admin | 2,206 ▲15 | 5.91 ▲0.01 | 105.68 ▲5.40 | 41.77 ▲4.38 |
Posts /wp-admin/edit.php | 2,086 ▼0 | 2.01 ▲0.02 | 39.41 ▲5.47 | 34.42 ▼0.68 |
Add New Post /wp-admin/post-new.php | 1,517 ▼16 | 17.86 ▼5.49 | 593.27 ▼143.28 | 56.70 ▼3.16 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.20 ▼0.00 | 95.28 ▼19.11 | 43.78 ▼4.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-custom-product-data-fields/fields-init.php:9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: custom fields, product data, product meta, framework, meta
woocommerce-custom-product-data-fields/wc-custom-product-data-fields.php 77% from 13 tests
"WooCommerce Custom Product Data Fields" version 1.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-custom-product-data-fields.php" instead of "wc-custom-product-data-fields.php")
- Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
- Description: Please keep the plugin description shorter than 140 characters (currently 159 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin755 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 273 | 100 | 543 |
JavaScript | 2 | 62 | 12 | 111 |
CSS | 2 | 18 | 0 | 101 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
These items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 125)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.69 |
Average class complexity | 140.00 |
▷ Minimum class complexity | 140.00 |
▷ Maximum class complexity | 140.00 |
Average method complexity | 16.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 125.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 9 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.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
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 167.25KB | 58.64KB | ▼ 64.94% |