Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
- The plugin cannot be installed
- > Error in wp-content/plugins/deal-of-the-day/includes/admin/install.class.php+38
Uncaught Error: Call to undefined function wc_get_page_id() in wp-content/plugins/deal-of-the-day/includes/admin/install.class.php:38
Stack trace:
#0 wp-includes/class-wp-hook.php(307): DD_Install->install()
#1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(474): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(689): do_action()
Server metrics [RAM: ▼0.02MB] [CPU: ▼295.11ms] Passed 4 tests
An overview of server-side resources used by Deals of the Day WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.01 | 55.00 ▼1.40 |
Dashboard /wp-admin | 3.42 ▲0.01 | 34.13 ▼2.78 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 37.09 ▼1.72 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.09 | 97.41 ▼1,174.52 |
Media Library /wp-admin/upload.php | 3.30 ▲0.00 | 26.75 ▲2.75 |
Server storage [IO: ▲3.45MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 213 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_accounts |
fs_active_plugins |
fs_debug_mode |
fs_gdpr |
Browser metrics Passed 4 tests
A check of browser resources used by Deals of the Day WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,763 ▲9 | 15.76 ▼0.32 | 5.46 ▼0.45 | 2.39 ▼0.37 |
Dashboard /wp-admin | 2,888 ▲27 | 6.12 ▼0.03 | 125.89 ▼36.37 | 175.68 ▲15.25 |
Posts /wp-admin/edit.php | 2,694 ▲9 | 3.23 ▲0.01 | 62.72 ▼4.59 | 140.62 ▼64.91 |
Add New Post /wp-admin/post-new.php | 1,661 ▼95 | 21.62 ▲4.64 | 409.60 ▼10.20 | 191.33 ▲12.14 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.56 ▲0.02 | 164.71 ▲7.76 | 238.02 ▲51.99 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 4 options in the database
- fs_accounts
- fs_active_plugins
- fs_debug_mode
- fs_gdpr
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/deal-of-the-day/freemius/templates/ajax-loader.php
- 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/deal-of-the-day/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Undefined variable: msg in wp-content/plugins/deal-of-the-day/includes/admin/views/_geneal_settings.php on line 2
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/deal-of-the-day/freemius/templates/account/partials/addon.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'DD_Admin_Views' not found in wp-content/plugins/deal-of-the-day/includes/admin/views/_header.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/deal-of-the-day/includes/shortcodes/views/deal_of_day_view.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/deal-of-the-day/freemius/templates/partials/network-activation.php:6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/deal-of-the-day/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'DD_Admin_Views' not found in wp-content/plugins/deal-of-the-day/includes/admin/views/_header.php:13
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/deal-of-the-day/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/deal-of-the-day/freemius/templates/account/partials/addon.php:9
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: deals woocommerce, livingsocial, woocommerce, groupon, wordpress deals...
deal-of-the-day/deal-of-the-day.php Passed 13 tests
This is the main PHP file of "Deals of the Day WooCommerce" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
53 characters long description:
Plugin to add facility in woocommerce to create deals
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin32,715 lines of code in 150 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 123 | 7,472 | 16,361 | 31,511 |
CSS | 16 | 50 | 63 | 523 |
JavaScript | 8 | 70 | 68 | 439 |
Markdown | 1 | 68 | 0 | 214 |
JSON | 1 | 0 | 0 | 27 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 75.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,895.00 |
Average method complexity | 4.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 55 | |
▷ Abstract classes | 2 | 3.64% |
▷ Concrete classes | 53 | 96.36% |
▷ Final classes | 1 | 1.89% |
Methods | 1,181 | |
▷ Static methods | 203 | 17.19% |
▷ Public methods | 837 | 70.87% |
▷ Protected methods | 15 | 1.27% |
▷ Private methods | 329 | 27.86% |
Functions | 99 | |
▷ Named functions | 99 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 124 | |
▷ Global constants | 99 | 79.84% |
▷ Class constants | 25 | 20.16% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.37MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/howto2.png | 19.95KB | 6.58KB | ▼ 66.99% |
screenshot-4.png | 14.82KB | 8.44KB | ▼ 43.07% |
screenshot-6.png | 42.72KB | 19.14KB | ▼ 55.20% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
screenshot-2.png | 31.77KB | 16.26KB | ▼ 48.81% |