Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲4.59MB] [CPU: ▼265.71ms] Passed 4 tests
Analyzing server-side resources used by WordPress Coupon Plugin for Bloggers and Marketers – WP Offers
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.37 ▲4.85 | 81.48 ▲23.29 |
Dashboard /wp-admin | 8.39 ▲4.98 | 66.43 ▲34.26 |
Posts /wp-admin/edit.php | 8.39 ▲4.74 | 70.15 ▲33.90 |
Add New Post /wp-admin/post-new.php | 10.76 ▲3.79 | 129.77 ▼1,143.94 |
Media Library /wp-admin/upload.php | 8.39 ▲5.08 | 52.00 ▲23.92 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 8.39 | 53.07 |
Server storage [IO: ▲4.65MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 221 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_debug_mode |
fs_gdpr |
fs_accounts |
fs_active_plugins |
Browser metrics Passed 4 tests
A check of browser resources used by WordPress Coupon Plugin for Bloggers and Marketers – WP Offers
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,848 ▲104 | 16.37 ▲0.71 | 7.83 ▲0.95 | 2.40 ▼0.67 |
Dashboard /wp-admin | 2,957 ▲96 | 6.16 ▲0.06 | 114.83 ▼15.88 | 172.22 ▲6.21 |
Posts /wp-admin/edit.php | 2,753 ▲65 | 3.38 ▲0.02 | 64.91 ▲2.68 | 153.95 ▲14.95 |
Add New Post /wp-admin/post-new.php | 1,662 ▲1 | 20.58 ▲4.36 | 424.37 ▼8.19 | 144.80 ▼5.80 |
Media Library /wp-admin/upload.php | 1,763 ▲65 | 5.54 ▲0.01 | 133.78 ▼9.06 | 204.65 ▲15.74 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 1,463 | 2.83 | 56.38 | 118.04 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/wp-offers/includes/freemius/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- The uninstall procedure has failed, leaving 4 options in the database
- fs_gdpr
- fs_debug_mode
- fs_accounts
- fs_active_plugins
Smoke tests 50% 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 0% 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 items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/wp-offers/includes/options-kit/view/options.php
- > /wp-content/plugins/wp-offers/includes/edit-form-coupon.php
- > /wp-content/plugins/wp-offers/templates/coupons.php
- 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: coupons in wp-content/plugins/wp-offers/templates/coupons.php on line 16
- > PHP Fatal error
Uncaught Error: Call to a member function offer_text() on null in wp-content/plugins/wp-offers/templates/item/default.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-offers/includes/options.php:484
- > PHP Fatal error
Uncaught Error: Class 'WPOffers\\Coupon' not found in wp-content/plugins/wp-offers/includes/class-coupon-preview.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-offers/includes/options-kit/class-options-kit.php:459
- > PHP Fatal error
Uncaught Error: Call to a member function offer_text() on null in wp-content/plugins/wp-offers/templates/item/grid.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function WPOffers\\add_action() in wp-content/plugins/wp-offers/includes/class-ask-for-review.php:113
- > PHP Notice
Undefined variable: coupon in wp-content/plugins/wp-offers/templates/item/default.php on line 19
- > PHP Notice
Undefined variable: coupon in wp-content/plugins/wp-offers/templates/item/grid.php on line 18
- > PHP Fatal error
Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-offers/includes/preview.php:14
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 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
8 plugin tags: affiliate marketing, wp offers, affiliates, affiliate coupons, coupon...
wp-offers/wp-offers.php 92% from 13 tests
The main PHP file in "WordPress Coupon Plugin for Bloggers and Marketers – WP Offers" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
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
Success! There were no dangerous files found in this plugin52,224 lines of code in 175 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 132 | 7,686 | 18,065 | 32,707 |
JavaScript | 18 | 4,289 | 2,729 | 18,135 |
CSS | 21 | 101 | 27 | 1,139 |
Markdown | 1 | 68 | 0 | 214 |
JSON | 1 | 0 | 0 | 27 |
SVG | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 78.93 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,910.00 |
Average method complexity | 4.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 54 | |
▷ Abstract classes | 2 | 3.70% |
▷ Concrete classes | 52 | 96.30% |
▷ Final classes | 0 | 0.00% |
Methods | 1,244 | |
▷ Static methods | 176 | 14.15% |
▷ Public methods | 895 | 71.95% |
▷ Protected methods | 15 | 1.21% |
▷ Private methods | 334 | 26.85% |
Functions | 123 | |
▷ Named functions | 112 | 91.06% |
▷ Anonymous functions | 11 | 8.94% |
Constants | 126 | |
▷ Global constants | 101 | 80.16% |
▷ Class constants | 25 | 19.84% |
▷ Public constants | 25 | 100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
includes/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
includes/freemius/assets/img/wp-offers.png | 34.43KB | 11.84KB | ▼ 65.61% |