Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼9.76ms] Passed 4 tests
A check of server-side resources used by Review for Discount for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 51.29 ▲13.25 |
Dashboard /wp-admin | 3.31 ▼0.04 | 43.07 ▼16.45 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.46 ▼5.68 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 88.88 ▼14.97 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.75 ▼1.93 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Review for Discount for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.38 ▲0.02 | 1.81 ▲0.21 | 43.18 ▲0.76 |
Dashboard /wp-admin | 2,195 ▲15 | 5.53 ▼0.05 | 82.76 ▼4.92 | 37.47 ▼4.71 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.04 ▲0.08 | 35.32 ▼4.48 | 33.06 ▼10.81 |
Add New Post /wp-admin/post-new.php | 1,535 ▲9 | 18.23 ▼4.80 | 590.11 ▼36.60 | 59.97 ▲2.66 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.18 ▼0.00 | 95.19 ▼7.70 | 40.40 ▼3.93 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 50% from 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
Please take a closer look at the following
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/review-for-discount/admin/partials/wc-review-discounts-support.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/review-for-discount/admin/partials/wc-review-discounts-admin-settings.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/review-for-discount/admin/partials/wc-review-discounts-admin-display.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/review-for-discount/admin/partials/wc-review-discounts-meta-box.php:1
- > 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 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: customer reviews, discount coupons, review for discount, product review, email for discounts
review-for-discount/review-for-review.php 77% from 13 tests
This is the main PHP file of "Review for Discount for WooCommerce" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Main file name: It is recommended to name the main PHP file as the plugin slug ("review-for-discount.php" instead of "review-for-review.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 309 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,802 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 160 | 506 | 1,462 |
CSS | 2 | 11 | 6 | 174 |
JavaScript | 2 | 5 | 1 | 166 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 16.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 4.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 35 | |
▷ Static methods | 2 | 5.71% |
▷ Public methods | 30 | 85.71% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 14.29% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
PNG images were not found in this plugin