Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.30MB] [CPU: ▲0.53ms] Passed 4 tests
A check of server-side resources used by Connect Paid Memberships Pro to Discord
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.76 ▲0.29 | 50.88 ▲7.08 |
Dashboard /wp-admin | 3.60 ▲0.30 | 54.72 ▼0.77 |
Posts /wp-admin/edit.php | 3.71 ▲0.36 | 55.04 ▲0.78 |
Add New Post /wp-admin/post-new.php | 6.20 ▲0.31 | 96.50 ▼4.99 |
Media Library /wp-admin/upload.php | 3.52 ▲0.29 | 48.37 ▲14.52 |
Discord Settings /wp-admin/admin.php?page=discord-options | 3.57 | 46.88 |
Scheduled Actions /wp-admin/tools.php?page=action-scheduler | 3.66 | 49.18 |
Server storage [IO: ▲1.20MB] [DB: ▲0.01MB] 67% from 3 tests
How much does this plugin use your filesystem and database?
Please try to fix the following items
- Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/pmpro-discord-add-on/" and "wp-content/uploads/"
- (new file) wp-content/cd9c8118-ee16-4c94-b731-0c3913259165discord_api_logs.txt
Filesystem: 117 new files
Database: 4 new tables, 31 new options
New tables |
---|
wp_actionscheduler_logs |
wp_actionscheduler_groups |
wp_actionscheduler_claims |
wp_actionscheduler_actions |
New WordPress options |
---|
ets_pmpro_discord_send_expiration_warning_dm |
ets_pmpro_discord_expiration_warning_message |
widget_theysaidso_widget |
ets_pmpro_discord_btn_color |
ets_pmpro_discord_loggedin_btn_text |
ets_pmpro_discord_expiration_expired_message |
widget_recent-comments |
ets_pmpro_discord_job_queue_concurrency |
ets_pmpro_discord_send_membership_cancel_dm |
ets_pmpro_discord_uuid_file_name |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Connect Paid Memberships Pro to Discord
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲59 | 14.27 ▲0.02 | 1.91 ▲0.29 | 44.48 ▲3.71 |
Dashboard /wp-admin | 2,201 ▲24 | 5.57 ▼0.01 | 84.84 ▼2.53 | 38.24 ▼3.16 |
Posts /wp-admin/edit.php | 2,106 ▲6 | 1.97 ▼0.07 | 33.81 ▼5.23 | 37.53 ▲0.53 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.32 ▲0.15 | 660.08 ▼12.90 | 53.60 ▲1.23 |
Media Library /wp-admin/upload.php | 1,406 ▲9 | 4.24 ▲0.02 | 110.56 ▲9.12 | 46.65 ▲0.65 |
Discord Settings /wp-admin/admin.php?page=discord-options | 1,815 | 2.59 | 62.05 | 47.63 |
Scheduled Actions /wp-admin/tools.php?page=action-scheduler | 1,212 | 1.81 | 26.48 | 30.27 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/pmpro-discord-add-on/uninstall.php+11
Undefined index: plugin
- Zombie tables were found after uninstall: 4 tables
- wp_actionscheduler_groups
- wp_actionscheduler_logs
- wp_actionscheduler_claims
- wp_actionscheduler_actions
- The uninstall procedure has failed, leaving 31 options in the database
- widget_recent-posts
- ets_pmpro_retry_failed_api
- ets_pmpro_btn_disconnect_color
- ets_pmpro_retry_api_count
- action_scheduler_lock_async-request-runner
- ets_pmpro_discord_job_queue_batch_size
- ets_pmpro_disconnect_btn_text
- ets_pmpro_discord_send_membership_cancel_dm
- can_compress_scripts
- ets_pmpro_discord_send_expiration_warning_dm
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Almost there! Just fix the following items
- 53× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/pmpro-discord-add-on/includes/pages/get-support.php:3
- > PHP Fatal error
Uncaught Error: Class 'ActionScheduler_Schedule_Deprecated' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/pmpro-discord-add-on/includes/pages/discord-role-level-map.php:2
- > PHP Fatal error
Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php:21
- > PHP Fatal error
Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php:15
- > PHP Fatal error
Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
- > PHP Fatal error
Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
- > PHP Fatal error
Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-discord-add-on/includes/classes/class-discord-api.php:8
- > PHP Fatal error
Uncaught Error: Class 'Action_Scheduler\\Migration\\ActionMigrator' not found in wp-content/plugins/pmpro-discord-add-on/libraries/action-scheduler/classes/migration/DryRun_ActionMigrator.php:15
- > 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)
No browser errors were detected
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
7 plugin tags: discord role management, discord, memberships, hang out, friends...
pmpro-discord-add-on/pmpro-discord.php 92% from 13 tests
Analyzing the main PHP file in "Connect Paid Memberships Pro to Discord" version 1.2.12
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pmpro-discord-add-on.php" instead of "pmpro-discord.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
No dangerous file extensions were detected16,044 lines of code in 106 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 96 | 1,763 | 4,826 | 8,142 |
JavaScript | 4 | 2,098 | 1,910 | 7,226 |
CSS | 3 | 8 | 11 | 511 |
Markdown | 3 | 48 | 0 | 165 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 13.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 186.00 |
Average method complexity | 2.78 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 45.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 80 | |
▷ Abstract classes | 15 | 18.75% |
▷ Concrete classes | 65 | 81.25% |
▷ Final classes | 0 | 0.00% |
Methods | 630 | |
▷ Static methods | 66 | 10.48% |
▷ Public methods | 476 | 75.56% |
▷ Protected methods | 132 | 20.95% |
▷ Private methods | 22 | 3.49% |
Functions | 38 | |
▷ Named functions | 31 | 81.58% |
▷ Anonymous functions | 7 | 18.42% |
Constants | 42 | |
▷ Global constants | 10 | 23.81% |
▷ Class constants | 32 | 76.19% |
▷ Public constants | 32 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.30MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/ets-logo.png | 11.34KB | 7.55KB | ▼ 33.46% |
assets/images/user-original.png | 6.06KB | 3.05KB | ▼ 49.66% |
assets/images/ravisoni.png | 278.09KB | 110.22KB | ▼ 60.36% |
assets/images/icon.png | 11.19KB | 5.20KB | ▼ 53.58% |