63% expresstechsoftwares-memberpress-discord-add-on

Code Review | Connect MemberPress To Discord

WordPress plugin Connect MemberPress To Discord scored63%from 54 tests.

About plugin

  • Plugin page: expresstechsoftwa...
  • Plugin version: 1.0.20
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Apr 12, 2022
  • Latest release: Oct 13, 2023
  • Number of updates: 32
  • Update frequency: every 17.4 days
  • Top authors: expresstechsoftware (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /4,921 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.60MB] [CPU: ▲5.11ms] Passed 4 tests

Server-side resources used by Connect MemberPress To Discord
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.08 ▲1.6256.68 ▲20.02
Dashboard /wp-admin4.95 ▲1.6159.47 ▲1.16
Posts /wp-admin/edit.php5.00 ▲1.6455.72 ▲11.74
Add New Post /wp-admin/post-new.php7.49 ▲1.6094.66 ▼4.06
Media Library /wp-admin/upload.php4.81 ▲1.5847.63 ▲11.58
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.9658.10
Discord Settings /wp-admin/admin.php?page=memberpress-discord4.8548.03

Server storage [IO: ▲1.01MB] [DB: ▲0.01MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/" and "wp-content/uploads/"
    • (new file) wp-content/f8309106-d97e-4495-a504-fba5170874fediscord_api_logs.txt
Filesystem: 133 new files
Database: 4 new tables, 31 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_claims
wp_actionscheduler_logs
wp_actionscheduler_groups
New WordPress options
ets_memberpress_discord_member_facing_text
ets_memberpress_discord_btn_disconnect_color
db_upgraded
ets_memberpress_discord_send_membership_expired_dm
schema-ActionScheduler_StoreSchema
ets_memberpress_discord_payment_failed
action_scheduler_hybrid_store_demarkation
ets_memberpress_discord_loggedout_btn_text
ets_memberpress_discord_btn_color
ets_memberpress_discord_send_expiration_warning_dm
...

Browser metrics Passed 4 tests

Connect MemberPress To Discord: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.41 ▲0.061.63 ▲0.0444.53 ▲1.92
Dashboard /wp-admin2,199 ▲185.50 ▼0.2182.66 ▼15.9137.78 ▼3.97
Posts /wp-admin/edit.php2,104 ▲12.13 ▲0.1433.68 ▼2.0532.41 ▼1.17
Add New Post /wp-admin/post-new.php1,529 ▼823.07 ▲5.05665.73 ▲71.6363.79 ▼2.14
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0195.44 ▲0.9841.45 ▼4.35
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2251.8122.8330.34
Discord Settings /wp-admin/admin.php?page=memberpress-discord1,8342.6163.3646.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/uninstall.php+13
    Undefined index: plugin
  • Zombie tables were found after uninstall: 4 tables
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
  • This plugin did not uninstall successfully, leaving 31 options in the database
    • ets_memberpress_discord_member_facing_text
    • ets_memberpress_discord_cancel_message
    • ets_memberpress_discord_expiration_expired_message
    • ets_memberpress_discord_btn_disconnect_color
    • widget_recent-posts
    • ets_memberpress_discord_expiration_warning_message
    • widget_recent-comments
    • ets_memberpress_discord_allow_none_member
    • schema-ActionScheduler_StoreSchema
    • ets_memberpress_discord_send_welcome_dm
    • ...

Smoke tests 75% 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 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
  • 51× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/admin/partials/pages/memberpress-discord-documentation.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_DBStore' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Schedule_Deprecated' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/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/expresstechsoftwares-memberpress-discord-add-on/admin/partials/pages/memberpress-discord-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\ActionMigrator' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/classes/migration/DryRun_ActionMigrator.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_YearField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store_Deprecated' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/classes/abstracts/ActionScheduler_Store.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/expresstechsoftwares-memberpress-discord-add-on/includes/libraries/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: discord role management, discord, hang out, sell private access, video chat...

expresstechsoftwares-memberpress-discord-add-on/memberpress-discord.php 77% from 13 tests

"Connect MemberPress To Discord" version 1.0.20's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 246 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("expresstechsoftwares-memberpress-discord-add-on.php" instead of "memberpress-discord.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin9,773 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP1031,8465,2648,651
CSS5119578
JavaScript73617371
Markdown3470163
SVG10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.21
▷ Minimum class complexity1.00
▷ Maximum class complexity270.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes83
▷ Abstract classes1518.07%
▷ Concrete classes6881.93%
▷ Final classes00.00%
Methods650
▷ Static methods6810.46%
▷ Public methods49275.69%
▷ Protected methods13220.31%
▷ Private methods264.00%
Functions49
▷ Named functions4081.63%
▷ Anonymous functions918.37%
Constants42
▷ Global constants921.43%
▷ Class constants3378.57%
▷ Public constants33100.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.29MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon.png8.96KB4.50KB▼ 49.73%
admin/images/ets-logo.png11.34KB7.55KB▼ 33.46%
admin/images/ravisoni.png278.09KB110.22KB▼ 60.36%