Benchmarks
Plugin footprint 83% 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: ▲0.20MB] [CPU: ▼0.89ms] Passed 4 tests
Analyzing server-side resources used by Dr Affiliate
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 42.64 ▼2.06 |
Dashboard /wp-admin | 3.59 ▲0.24 | 61.25 ▼4.51 |
Posts /wp-admin/edit.php | 3.65 ▲0.30 | 57.96 ▲6.31 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.20 | 94.58 ▲0.42 |
Media Library /wp-admin/upload.php | 3.44 ▲0.21 | 38.37 ▲2.59 |
Import & Export CSV /wp-admin/admin.php?page=import-export-dr-affiliate-slug | 3.43 | 40.69 |
Smart Reports /wp-admin/admin.php?page=report-dr-affiliate-slug | 3.43 | 41.55 |
Setting /wp-admin/admin.php?page=setting-dr-affiliate-slug | 3.44 | 41.71 |
New Affiliate Link /wp-admin/admin.php?page=add-dr-affiliate-slug | 3.47 | 43.10 |
Third Party API /wp-admin/admin.php?page=third-party-dr-affiliate-slug | 3.43 | 40.43 |
All Affiliate /wp-admin/admin.php?page=dr-affiliate-slug | 3.43 | 39.64 |
Server storage [IO: ▲0.93MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 45 new files
Database: 4 new tables, 6 new options
New tables |
---|
wp_dr_affiliate_clicks |
wp_dr_affiliate |
wp_dr_affiliate_image |
wp_dr_affiliate_geolocation |
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Dr Affiliate: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,195 ▲434 | 19.36 ▲4.99 | 10.79 ▲8.88 | 42.70 ▼1.47 |
Dashboard /wp-admin | 2,482 ▲279 | 8.71 ▲2.90 | 251.56 ▲133.03 | 46.08 ▲1.87 |
Posts /wp-admin/edit.php | 2,416 ▲319 | 8.33 ▲6.31 | 88.16 ▲48.61 | 35.66 ▲0.45 |
Add New Post /wp-admin/post-new.php | 6,252 ▲4,726 | 19.25 ▲1.61 | 770.41 ▲90.35 | 39.08 ▼12.79 |
Media Library /wp-admin/upload.php | 1,548 ▲148 | 9.60 ▲5.35 | 126.28 ▲3.86 | 51.52 ▲1.36 |
Import & Export CSV /wp-admin/admin.php?page=import-export-dr-affiliate-slug | 1,168 | 8.06 | 85.77 | 48.35 |
Smart Reports /wp-admin/admin.php?page=report-dr-affiliate-slug | 1,174 | 8.02 | 78.82 | 38.63 |
Setting /wp-admin/admin.php?page=setting-dr-affiliate-slug | 1,213 | 8.01 | 76.73 | 35.18 |
New Affiliate Link /wp-admin/admin.php?page=add-dr-affiliate-slug | 1,350 | 7.95 | 79.75 | 30.99 |
Third Party API /wp-admin/admin.php?page=third-party-dr-affiliate-slug | 1,173 | 8.04 | 86.64 | 36.55 |
All Affiliate /wp-admin/admin.php?page=dr-affiliate-slug | 1,151 | 8.08 | 79.54 | 32.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/dr-affiliate/admin/partials/dr-report.php
- > /wp-content/plugins/dr-affiliate/public/partials/dr-affilate-public-display.php
- > /wp-content/plugins/dr-affiliate/admin/partials/dr-import-export-affiliate.php
- > /wp-content/plugins/dr-affiliate/admin/partials/dr-third-party-affiliate.php
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/dr-affiliate/admin/partials/dr-affilate-admin-display.php:59
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/dr-affiliate/admin/partials/dr-affilate-admin-display.php on line 58
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/dr-affiliate/admin/partials/dr-new-affiliate.php:35
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dr-affiliate/admin/partials/dr-affilate-setting.php:23
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
- > GET request to /wp-admin/admin.php?page=dr-affiliate-slug
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'getContext')" "TypeError: Cannot read properties of null (reading 'getContext')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/dr-affiliate/admin/js/dr-affilate-admin.js?ver=1.0.0:210:48)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=dr-affiliate-slug
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'getContext')
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== dr-affiliate ===
)
dr-affiliate/dr-affilate.php 85% from 13 tests
The entry point to "Dr Affiliate" version 1.2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("dr-affiliate.php" instead of "dr-affilate.php")
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
There were no executable files found in this plugin16,987 lines of code in 37 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 15,145 |
PHP | 20 | 175 | 710 | 980 |
JavaScript | 11 | 70 | 131 | 588 |
CSS | 3 | 35 | 18 | 258 |
Sass | 1 | 1 | 0 | 16 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 5.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 1.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 2 | 3.92% |
▷ Public methods | 46 | 90.20% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 9.80% |
Functions | 5 | |
▷ Named functions | 5 | 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
All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin