Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼6.08ms] Passed 4 tests
An overview of server-side resources used by Discount for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 46.44 ▲4.96 |
Dashboard /wp-admin | 3.31 ▼0.03 | 50.82 ▼15.48 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 51.64 ▼0.09 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 86.77 ▼9.72 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 35.42 ▲0.96 |
Discount price /wp-admin/admin.php?page=dpw-sale-submenu-page | 3.20 | 31.68 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options |
---|
dpw_discount_all |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
dpw_discount_logged |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Discount for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲39 | 14.19 ▼0.56 | 1.93 ▲0.14 | 43.94 ▼4.48 |
Dashboard /wp-admin | 2,195 ▲15 | 5.64 ▼0.05 | 93.61 ▲1.08 | 42.02 ▼0.72 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▼0.04 | 35.13 ▼5.06 | 36.85 ▲2.34 |
Add New Post /wp-admin/post-new.php | 1,526 ▼19 | 17.55 ▼5.88 | 671.63 ▼8.80 | 57.07 ▼0.73 |
Media Library /wp-admin/upload.php | 1,397 ▼0 | 4.25 ▲0.03 | 98.03 ▼3.55 | 43.42 ▲1.58 |
Discount price /wp-admin/admin.php?page=dpw-sale-submenu-page | 789 | 2.05 | 24.49 | 25.97 |
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
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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 fix the following items
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/discount-for-woocommerce/index.php:29
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/discount-for-woocommerce/index.php on line 18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: price, discount, exchange rate, woocommerce, sale
discount-for-woocommerce/index.php 77% from 13 tests
Analyzing the main PHP file in "Discount for WooCommerce" version 1.0.2
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("discount-for-woocommerce.php" instead of "index.php")
- Description: The description should be shorter than 140 characters (currently 164 characters long)
- Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "5.4.2")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected84 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 67 | 23 | 84 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 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
There were not PNG files found in your plugin