Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.05MB] [CPU: ▼5.86ms] Passed 4 tests
Server-side resources used by Free Product Sample for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 41.17 ▲2.54 |
Dashboard /wp-admin | 3.35 ▲0.05 | 44.25 ▼5.12 |
Posts /wp-admin/edit.php | 3.46 ▲0.11 | 49.56 ▼8.81 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 94.33 ▼9.34 |
Media Library /wp-admin/upload.php | 3.27 ▲0.05 | 35.08 ▼0.15 |
Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Free Product Sample for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.48 ▲0.20 | 1.95 ▲0.09 | 43.18 ▲4.51 |
Dashboard /wp-admin | 2,209 ▲21 | 4.85 ▼0.04 | 110.75 ▲6.94 | 42.00 ▲0.41 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.99 ▲0.00 | 38.95 ▼2.96 | 33.94 ▼2.65 |
Add New Post /wp-admin/post-new.php | 1,521 ▼21 | 23.22 ▲4.93 | 567.40 ▼21.95 | 50.86 ▼2.36 |
Media Library /wp-admin/upload.php | 1,388 ▲6 | 4.22 ▲0.05 | 94.55 ▼4.73 | 42.76 ▼1.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 20× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/woo-free-product-sample/admin/partials/woo-free-product-sample-message.php:4
- > PHP Notice
Undefined variable: value in wp-content/plugins/woo-free-product-sample/admin/includes/fields/checkbox.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-free-product-sample/admin/includes/fields/number.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-free-product-sample/admin/includes/fields/checkbox.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-free-product-sample/admin/includes/fields/select.php:2
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/woo-free-product-sample/admin/includes/fields/checkbox.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woo-free-product-sample/admin/partials/footer.php:6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/woo-free-product-sample/admin/includes/fields/double-repeater.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-free-product-sample/admin/includes/fields/multi-select.php:2
- > PHP Notice
Undefined variable: is_pro in wp-content/plugins/woo-free-product-sample/admin/includes/fields/checkbox.php on line 8
- > 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 Passed 29 tests
readme.txt Passed 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
10 plugin tags: free, free-product-sample, e-commerce, free-sample, dokan...
woo-free-product-sample/woo-free-product-sample.php Passed 13 tests
The main PHP script in "Free Product Sample for WooCommerce" version 2.3.1 is automatically included on every request by WordPress
62 characters long description:
It allows customers to order a product sample in a simple way.
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 detected3,494 lines of code in 41 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 34 | 497 | 1,072 | 2,085 |
CSS | 2 | 191 | 31 | 1,025 |
PO File | 2 | 123 | 176 | 328 |
JavaScript | 1 | 7 | 0 | 44 |
JSON | 2 | 0 | 0 | 12 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 19.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 119.00 |
Average method complexity | 3.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 110 | |
▷ Static methods | 24 | 21.82% |
▷ Public methods | 95 | 86.36% |
▷ Protected methods | 1 | 0.91% |
▷ Private methods | 14 | 12.73% |
Functions | 6 | |
▷ Named functions | 5 | 83.33% |
▷ Anonymous functions | 1 | 16.67% |
Constants | 13 | |
▷ Global constants | 13 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.18MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/bg_horiz.png | 38.64KB | 23.73KB | ▼ 38.59% |
admin/img/wfps-rocket.png | 17.60KB | 7.93KB | ▼ 54.97% |
admin/img/wfps-tick.png | 0.38KB | 0.33KB | ▼ 12.99% |
admin/img/tick.png | 0.38KB | 0.33KB | ▼ 12.99% |
admin/img/bg_premium.png | 64.64KB | 48.04KB | ▼ 25.68% |