58% connect-eduma-theme-to-discord

Code Review | Connect Eduma Theme to Discord

WordPress plugin Connect Eduma Theme to Discord scored58%from 54 tests.

About plugin

  • Plugin page: connect-eduma-the...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 23, 2022
  • Latest release: Sep 6, 2023
  • Number of updates: 7
  • Update frequency: every 36.7 days
  • Top authors: expresstechsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.57MB] [CPU: ▲8.07ms] Passed 4 tests

A check of server-side resources used by Connect Eduma Theme to Discord
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.5959.01 ▲13.45
Dashboard /wp-admin4.89 ▲1.5961.12 ▲10.17
Posts /wp-admin/edit.php4.94 ▲1.5963.19 ▲9.44
Add New Post /wp-admin/post-new.php7.45 ▲1.56104.26 ▼0.78
Media Library /wp-admin/upload.php4.75 ▲1.5256.22 ▲19.68
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.9055.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 148 new files
Database: 4 new tables, 40 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_groups
wp_actionscheduler_logs
wp_actionscheduler_claims
New WordPress options
ets_eduma_discord_welcome_message
ets_eduma_discord_retry_api_count
ets_eduma_pmpro_discord_send_membership_cancel_dm
ets_eduma_pmpro_discord_payment_failed
ets_eduma_discord_job_queue_concurrency
ets_eduma_discord_retry_failed_api
ets_eduma_pmpro_discord_expiration_expired_message
ets_eduma_discord_loggedin_button_text
schema-ActionScheduler_LoggerSchema
ets_eduma_pmpro_discord_expiration_warning_message
...

Browser metrics Passed 4 tests

Connect Eduma Theme to Discord: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.212.19 ▲0.6346.67 ▲3.40
Dashboard /wp-admin2,199 ▲255.59 ▲0.0187.52 ▼4.2141.36 ▼0.92
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0136.85 ▼2.6833.14 ▼7.61
Add New Post /wp-admin/post-new.php1,534 ▲823.28 ▼0.36688.32 ▲26.7455.40 ▼0.90
Media Library /wp-admin/upload.php1,404 ▲74.19 ▲0.0199.52 ▼6.0245.55 ▲3.88
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2251.8125.3031.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/connect-eduma-theme-to-discord/uninstall.php+33
    Undefined index: plugin
  • Zombie tables were found after uninstall: 4 tables
    • wp_actionscheduler_logs
    • wp_actionscheduler_groups
    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
  • Zombie WordPress options detected upon uninstall: 40 options
    • widget_recent-comments
    • action_scheduler_hybrid_store_demarkation
    • ets_eduma_discord_send_welcome_dm
    • ets_eduma_pmpro_discord_cancel_message
    • ets_eduma_discord_cache_timeout_interval
    • ets_eduma_pmpro_discord_payment_failed
    • ets_eduma_pmpro_discord_expiration_warning_message
    • ets_eduma_discord_job_queue_batch_size
    • ets_eduma_discord_retry_failed_api
    • ets_eduma_pmpro_allow_none_member
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/connect-eduma-theme-to-discord/public/partials/connect-eduma-theme-to-discord-public-display.php
    • > /wp-content/plugins/connect-eduma-theme-to-discord/admin/partials/pages/templates/guide/logs.php
  • 59× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/connect-eduma-theme-to-discord/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php:10
    • > 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-eduma-theme-to-discord/includes/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/connect-eduma-theme-to-discord/admin/partials/pages/templates/guide/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_AdminView_Deprecated' not found in wp-content/plugins/connect-eduma-theme-to-discord/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/connect-eduma-theme-to-discord/admin/partials/pages/eduma_discord_pmpro.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_FinishedAction' not found in wp-content/plugins/connect-eduma-theme-to-discord/includes/libraries/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/connect-eduma-theme-to-discord/admin/partials/pages/templates/guide/welcome.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/connect-eduma-theme-to-discord/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/connect-eduma-theme-to-discord/includes/libraries/action-scheduler/classes/actions/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ets_eduma_discord_get_steps() in wp-content/plugins/connect-eduma-theme-to-discord/admin/partials/pages/eduma_discord_documentation.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: learnpress, memberships, learning community management, learnpress discord addon, eduma themme...

connect-eduma-theme-to-discord/connect-eduma-theme-to-discord.php Passed 13 tests

The entry point to "Connect Eduma Theme to Discord" version 1.0.3 is a PHP file that has certain tags in its header comment area
117 characters long description:
Connect your students to the discord server to create a community, information sharing, competition between students.

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
Good job! No executable or dangerous file extensions detected11,308 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142,1255,7089,927
CSS61332750
JavaScript65888540
Markdown337091

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.82
▷ Minimum class complexity1.00
▷ Maximum class complexity196.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes86
▷ Abstract classes1517.44%
▷ Concrete classes7182.56%
▷ Final classes00.00%
Methods673
▷ Static methods7210.70%
▷ Public methods51476.37%
▷ Protected methods13219.61%
▷ Private methods274.01%
Functions58
▷ Named functions5187.93%
▷ Anonymous functions712.07%
Constants41
▷ Global constants921.95%
▷ Class constants3278.05%
▷ Public constants32100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.42MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/guide/role-mappings/pmpro-rolemappings-connect-eduma-theme-to-discord.png29.21KB15.97KB▼ 45.31%
admin/images/guide/settings/settings-connect-eduma-theme-to-discord.png123.36KB63.57KB▼ 48.47%
admin/images/guide/pmpro-connect-eduma-theme-to-discord.png20.27KB11.11KB▼ 45.19%
admin/images/guide/role-mappings/rolemappings-connect-eduma-theme-to-discord.png31.59KB17.19KB▼ 45.58%
admin/images/guide/lp-profile-connect-eduma-theme-to-discord.png36.36KB18.85KB▼ 48.15%