Benchmarks
Plugin footprint 39% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/pbci-product-manager-client.class.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; PBCI_Product_Manager_Client has a deprecated constructor
Server metrics [RAM: ▲0.07MB] [CPU: ▲606.44ms] 50% from 4 tests
Server-side resources used by Shopper Rewards for WP-eCommerce
The following require your attention
- CPU: Total CPU usage should be kept under 500.00ms (currently 1,285.51ms on /wp-admin/admin.php?page=pbci_shopper_rewards_redeem)
- Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 606.44ms on /wp-admin/admin.php?page=pbci_shopper_rewards_redeem)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 38.69 ▼1.01 |
Dashboard /wp-admin | 3.43 ▲0.13 | 900.03 ▲852.08 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 847.81 ▲804.21 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 908.19 ▲808.91 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 843.62 ▲813.64 |
Upgrade to Basic /wp-admin/admin.php?page=registration_page_callback | 3.25 | 2,707.61 |
Exclude Categories /wp-admin/admin.php?page=pbci_shopper_rewards_categories | 3.23 | 809.51 |
Get Coupon /wp-admin/admin.php?page=pbci_shopper_rewards_get_coupon | 3.23 | 811.94 |
Redemption Levels /wp-admin/admin.php?page=pbci_shopper_rewards_redemption_levels | 3.25 | 823.20 |
Points Details /wp-admin/admin.php?page=points_details_list_page | 3.26 | 811.48 |
Import /wp-admin/admin.php?page=pbci_shopper_rewards_import | 3.25 | 807.33 |
Welcome /wp-admin/admin.php?page=pbci_shopper_rewards_admin | 3.23 | 826.98 |
Settings /wp-admin/admin.php?page=pbci_shopper_rewards_settings | 3.23 | 867.38 |
Redeem /wp-admin/admin.php?page=pbci_shopper_rewards_redeem | 3.25 | 1,285.51 |
Server storage [IO: ▲0.89MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_shopper_rewards |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
recovery_mode_email_last_sent |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Shopper Rewards for WP-eCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲111 | 13.65 ▼0.75 | 1.86 ▼0.01 | 45.78 ▼1.47 |
Dashboard /wp-admin | 2,238 ▲49 | 5.82 ▲0.85 | 99.84 ▼24.90 | 81.14 ▲36.30 |
Posts /wp-admin/edit.php | 2,136 ▲47 | 1.98 ▼0.02 | 33.85 ▼5.23 | 33.24 ▼1.19 |
Add New Post /wp-admin/post-new.php | 1,703 ▲189 | 21.93 ▲4.40 | 725.89 ▲51.69 | 46.13 ▼10.97 |
Media Library /wp-admin/upload.php | 1,432 ▲41 | 4.22 ▼0.03 | 97.17 ▼2.27 | 76.48 ▲30.16 |
Upgrade to Basic /wp-admin/admin.php?page=registration_page_callback | 870 | 2.02 | 24.60 | 29.95 |
Exclude Categories /wp-admin/admin.php?page=pbci_shopper_rewards_categories | 885 | 2.01 | 22.60 | 31.62 |
Get Coupon /wp-admin/admin.php?page=pbci_shopper_rewards_get_coupon | 833 | 2.02 | 22.98 | 23.17 |
Redemption Levels /wp-admin/admin.php?page=pbci_shopper_rewards_redemption_levels | 953 | 2.06 | 24.22 | 26.56 |
Points Details /wp-admin/admin.php?page=points_details_list_page | 1,001 | 2.20 | 24.91 | 28.54 |
Import /wp-admin/admin.php?page=pbci_shopper_rewards_import | 824 | 2.03 | 26.79 | 26.69 |
Welcome /wp-admin/admin.php?page=pbci_shopper_rewards_admin | 902 | 2.02 | 23.52 | 38.78 |
Settings /wp-admin/admin.php?page=pbci_shopper_rewards_settings | 755 | 1.14 | 6.56 | 18.66 |
Redeem /wp-admin/admin.php?page=pbci_shopper_rewards_redeem | 805 | 2.02 | 22.99 | 20.86 |
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
Please fix the following items
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_shopper_rewards
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- recovery_mode_email_last_sent
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_categories
- > Notice in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/categories.php+81
Trying to get property 'term_id' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_categories
- > Notice in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/categories.php+81
Trying to get property 'name' of non-object
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_get_coupon
- > Notice in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/redeem.php+228
Undefined index: redemption
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_get_coupon
- > Notice in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/util.php+148
Undefined index: HTTP_REFERER
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_admin
- > Warning in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/db.php+157
Use of undefined constant WPSC_TABLE_COUPON_CODES - assumed 'WPSC_TABLE_COUPON_CODES' (this will throw an Error in a future version of PHP)
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_settings
- > Warning in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/messages.php+61
_() expects exactly 1 parameter, 2 given
- > GET request to /wp-admin/admin.php?page=pbci_shopper_rewards_settings
- > Error in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/settings.php+93
Uncaught Error: Call to undefined function wpsc_currency_display() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/settings.php:93
Stack trace:
#0 wp-includes/class-wp-hook.php(310): pbci_shopper_rewards_settings()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/admin.php(259): do_action()
#4 {main}
thrown
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/wpsc-hooks-and-filters.php:72
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/userprofile.php:69
- > PHP Fatal error
Uncaught Error: Call to undefined function has_action() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/pbci-product-manager-client.class.php:890
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/loginbyemail.php:58
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/list-totals.php on line 65
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/style.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/status.php:219
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/list-totals.php on line 65
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/list-details.php on line 64
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopper-rewards-free-for-wp-ecommerce/core/receipt.php:67
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: rewards, points, shopping, store, wp-ecommerce
shopper-rewards-free-for-wp-ecommerce/pbci-shopper-rewards-for-wpec.php 92% from 13 tests
The entry point to "Shopper Rewards for WP-eCommerce" version 2013.07.15.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("shopper-rewards-free-for-wp-ecommerce.php" instead of "pbci-shopper-rewards-for-wpec.php")
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
Good job! No executable or dangerous file extensions detected3,320 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 21 | 732 | 1,480 | 2,497 |
HTML | 1 | 108 | 0 | 626 |
PO File | 1 | 54 | 55 | 148 |
CSS | 1 | 10 | 20 | 49 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 28.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 85.00 |
Average method complexity | 2.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 63 | |
▷ Static methods | 1 | 1.59% |
▷ Public methods | 55 | 87.30% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 12.70% |
Functions | 99 | |
▷ Named functions | 99 | 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
PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/pye-brook-shopper-rewards-logo-16.png | 0.84KB | 0.95KB | 0.00% |
images/bpicon32.png | 1.37KB | 1.38KB | 0.00% |
images/pye-brook-shopper-rewards-logo-100.png | 11.07KB | 5.11KB | ▼ 53.84% |
images/pye-brook-shopper-rewards-logo-32.png | 2.32KB | 1.77KB | ▼ 23.62% |
images/pye-brook-logo-16-16.png | 0.57KB | 0.52KB | ▼ 7.77% |