58% connect-tutorlms-to-discord

Code Review | Connect Tutor LMS to Discord

WordPress plugin Connect Tutor LMS to Discord scored 58% from 54 tests.

About plugin

  • Plugin page: connect-tutorlms-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Sep 11, 2023
  • Number of updates: 9
  • Update frequency: every 20.6 days
  • Top authors: expresstechsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 324 total downloads

Benchmarks

Plugin footprint 48% 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: ▲1.44MB] [CPU: ▲10.54ms] Passed 4 tests

Server-side resources used by Connect Tutor LMS to Discord
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.90 ▲1.4352.93 ▲7.89
Dashboard /wp-admin4.78 ▲1.4859.54 ▲10.28
Posts /wp-admin/edit.php4.83 ▲1.4765.71 ▲12.79
Add New Post /wp-admin/post-new.php7.32 ▲1.43102.96 ▲11.18
Media Library /wp-admin/upload.php4.64 ▲1.4151.54 ▲15.10
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.8056.67

Server storage [IO: ▲1.09MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 133 new files
Database: 4 new tables, 26 new options
New tables
wp_actionscheduler_claims
wp_actionscheduler_actions
wp_actionscheduler_groups
wp_actionscheduler_logs
New WordPress options
widget_recent-posts
ets_tutor_lms_discord_retry_failed_api
ets_tutor_lms_discord_non_login_button_text
action_scheduler_lock_async-request-runner
ets_tutor_lms_discord_send_course_enrolled_dm
ets_tutor_lms_discord_send_welcome_dm
can_compress_scripts
ets_tutor_lms_discord_welcome_message
action_scheduler_hybrid_store_demarkation
ets_tutor_lms_discord_retry_api_count
...

Browser metrics Passed 4 tests

A check of browser resources used by Connect Tutor LMS to Discord
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.26 ▼1.034.56 ▲2.6938.10 ▼14.61
Dashboard /wp-admin2,213 ▲254.85 ▼1.01112.49 ▲0.0942.03 ▲1.08
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0238.56 ▼1.5531.26 ▼7.31
Add New Post /wp-admin/post-new.php1,517 ▼1617.43 ▼5.84657.18 ▼16.3756.07 ▼1.40
Media Library /wp-admin/upload.php1,395 ▲74.14 ▼0.08100.90 ▼1.1946.80 ▲2.07
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2411.8425.8230.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/connect-tutorlms-to-discord/uninstall.php+34
    Undefined index: plugin
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_actionscheduler_claims
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
    • wp_actionscheduler_logs
  • This plugin does not fully uninstall, leaving 26 options in the database
    • widget_theysaidso_widget
    • ets_tutor_lms_discord_job_queue_batch_size
    • can_compress_scripts
    • schema-ActionScheduler_StoreSchema
    • action_scheduler_lock_async-request-runner
    • ets_tutor_lms_discord_retry_failed_api
    • ets_tutor_lms_discord_course_enrolled_message
    • theysaidso_admin_options
    • ets_tutor_lms_discord_send_course_complete_dm
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/connect-tutorlms-to-discord/public/partials/connect-discord-tutor-lms-public-display.php
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > 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/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/connect-tutorlms-to-discord/admin/partials/pages/connect-discord-tutor-lms-log.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/actions/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\LogMigrator' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/migration/DryRun_LogMigrator.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/WP_CLI/Migration_Command.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/connect-tutorlms-to-discord/includes/libraries/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: talk, video chat, friends, discord role management, lms...

connect-tutorlms-to-discord/connect-discord-tutor-lms.php 85% from 13 tests

Analyzing the main PHP file in "Connect Tutor LMS to Discord" version 1.0.4
It is important to 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 ("connect-tutorlms-to-discord.php" instead of "connect-discord-tutor-lms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin9,348 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,9345,7188,207
CSS61520685
JavaScript65511356
Markdown237090
SVG10010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.02
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes84
▷ Abstract classes1517.86%
▷ Concrete classes6982.14%
▷ Final classes00.00%
Methods637
▷ Static methods6910.83%
▷ Public methods47975.20%
▷ Protected methods13421.04%
▷ Private methods243.77%
Functions53
▷ Named functions4584.91%
▷ Anonymous functions815.09%
Constants42
▷ Global constants921.43%
▷ Class constants3378.57%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.31MB with 0.16MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon.png30.09KB11.09KB▼ 63.15%
admin/images/ets-logo.png11.34KB7.55KB▼ 33.46%
admin/images/ravisoni.png278.09KB110.22KB▼ 60.36%