Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲2.18MB] [CPU: ▲6.30ms] Passed 4 tests
An overview of server-side resources used by Affiliates
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.92 ▲1.46 | 54.98 ▲10.75 |
Dashboard /wp-admin | 5.74 ▲2.39 | 70.74 ▼1.81 |
Posts /wp-admin/edit.php | 5.79 ▲2.43 | 74.99 ▲22.05 |
Add New Post /wp-admin/post-new.php | 8.35 ▲2.46 | 102.64 ▼5.79 |
Media Library /wp-admin/upload.php | 5.65 ▲2.43 | 69.03 ▲30.90 |
Visits & Referrals /wp-admin/admin.php?page=affiliates-admin-hits | 5.57 | 60.54 |
Add-Ons /wp-admin/admin.php?page=affiliates-admin-add-ons | 5.57 | 56.89 |
Traffic /wp-admin/admin.php?page=affiliates-admin-hits-uri | 5.57 | 51.46 |
Manage Affiliates /wp-admin/admin.php?page=affiliates-admin-affiliates | 5.57 | 60.69 |
Referrals /wp-admin/admin.php?page=affiliates-admin-referrals | 5.57 | 57.13 |
User Registration /wp-admin/admin.php?page=affiliates-admin-user-registration | 5.57 | 51.11 |
Affiliates & Referrals /wp-admin/admin.php?page=affiliates-admin-hits-affiliate | 5.57 | 56.49 |
Affiliates /wp-admin/admin.php?page=affiliates-admin | 5.57 | 61.11 |
Notifications /wp-admin/admin.php?page=affiliates-admin-notifications | 5.55 | 54.57 |
Settings /wp-admin/admin.php?page=affiliates-admin-settings | 5.67 | 57.44 |
Server storage [IO: ▲4.34MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 186 new files
Database: 8 new tables, 9 new options
New tables |
---|
wp_aff_referral_items |
wp_aff_affiliates |
wp_aff_user_agents |
wp_aff_robots |
wp_aff_referrals |
wp_aff_affiliates_users |
wp_aff_uris |
wp_aff_hits |
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
affiliates_plugin_version |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_affiliates_contact |
widget_recent-comments |
widget_affiliates_registration_widget |
Browser metrics Passed 4 tests
Affiliates: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,964 ▲203 | 14.28 ▼0.19 | 1.90 ▲0.21 | 33.82 ▼9.49 |
Dashboard /wp-admin | 2,358 ▲178 | 5.59 ▲0.04 | 94.03 ▲2.12 | 75.74 ▲33.05 |
Posts /wp-admin/edit.php | 2,190 ▲90 | 2.10 ▲0.16 | 39.14 ▲1.09 | 35.89 ▼1.55 |
Add New Post /wp-admin/post-new.php | 6,308 ▲4,782 | 26.27 ▲2.69 | 963.59 ▲272.82 | 52.90 ▲2.09 |
Media Library /wp-admin/upload.php | 1,487 ▲87 | 4.10 ▼0.10 | 103.90 ▼3.95 | 78.38 ▲28.44 |
Visits & Referrals /wp-admin/admin.php?page=affiliates-admin-hits | 1,108 | 2.55 | 52.23 | 42.13 |
Add-Ons /wp-admin/admin.php?page=affiliates-admin-add-ons | 1,124 | 1.97 | 36.97 | 37.52 |
Traffic /wp-admin/admin.php?page=affiliates-admin-hits-uri | 1,159 | 2.48 | 45.53 | 34.35 |
Manage Affiliates /wp-admin/admin.php?page=affiliates-admin-affiliates | 1,185 | 2.05 | 29.76 | 46.87 |
Referrals /wp-admin/admin.php?page=affiliates-admin-referrals | 1,171 | 2.51 | 39.70 | 35.00 |
User Registration /wp-admin/admin.php?page=affiliates-admin-user-registration | 1,685 | 2.04 | 28.60 | 30.23 |
Affiliates & Referrals /wp-admin/admin.php?page=affiliates-admin-hits-affiliate | 1,149 | 2.48 | 42.75 | 37.02 |
Affiliates /wp-admin/admin.php?page=affiliates-admin | 1,182 | 2.68 | 57.57 | 44.70 |
Notifications /wp-admin/admin.php?page=affiliates-admin-notifications | 981 | 1.92 | 27.83 | 36.72 |
Settings /wp-admin/admin.php?page=affiliates-admin-settings | 1,130 | 1.95 | 29.21 | 38.80 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie tables were found after uninstall: 8 tables
- wp_aff_hits
- wp_aff_robots
- wp_aff_user_agents
- wp_aff_referrals
- wp_aff_affiliates_users
- wp_aff_uris
- wp_aff_affiliates
- wp_aff_referral_items
- This plugin did not uninstall successfully, leaving 9 options in the database
- db_upgraded
- affiliates_plugin_version
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- widget_affiliates_contact
- widget_recent-comments
- widget_affiliates_registration_widget
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Please fix the following items
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Interface 'I_Affiliates_Dashboard_Section' not found in wp-content/plugins/affiliates/lib/core/dashboard/class-affiliates-dashboard-section.php:25
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/affiliates/lib/core/class-affiliates-exclusion.php:27
- > PHP Fatal error
Uncaught Error: Class 'Affiliates_Dashboard_Section' not found in wp-content/plugins/affiliates/lib/core/dashboard/class-affiliates-dashboard-section-table.php:25
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
- Tags: You are using too many tags: 33 tag instead of maximum 10
affiliates/affiliates.php Passed 13 tests
The principal PHP file in "Affiliates" v. 4.19.0 is loaded by WordPress automatically on each request
86 characters long description:
The Affiliates plugin provides the right tools to maintain a partner referral program.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin53,636 lines of code in 129 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 16 | 11,244 | 20,894 | 30,546 |
PHP | 82 | 2,030 | 5,123 | 15,249 |
JavaScript | 19 | 730 | 1,395 | 4,716 |
CSS | 12 | 60 | 218 | 3,125 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 20.92 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 197.00 |
Average method complexity | 4.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 89.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 56 | |
▷ Abstract classes | 2 | 3.57% |
▷ Concrete classes | 54 | 96.43% |
▷ Final classes | 0 | 0.00% |
Methods | 320 | |
▷ Static methods | 245 | 76.56% |
▷ Public methods | 309 | 96.56% |
▷ Protected methods | 2 | 0.62% |
▷ Private methods | 9 | 2.81% |
Functions | 86 | |
▷ Named functions | 86 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 113 | |
▷ Global constants | 70 | 61.95% |
▷ Class constants | 43 | 38.05% |
▷ Public constants | 43 | 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
35 PNG files occupy 0.38MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/pending.png | 0.20KB | 0.13KB | ▼ 33.97% |
images/required.png | 0.16KB | 0.13KB | ▼ 18.29% |
images/add-ons/affiliates-enterprise.png | 31.46KB | 12.30KB | ▼ 60.89% |
images/affiliates-bw.png | 0.20KB | 0.13KB | ▼ 36.59% |
images/add-ons/affiliates-permanent.png | 27.76KB | 11.05KB | ▼ 60.21% |