52% connect-gamipress-and-discord

Code Review | Connect GamiPress to Discord

WordPress plugin Connect GamiPress to Discord scored52%from 54 tests.

About plugin

  • Plugin page: connect-gamipress...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 17, 2023
  • Number of updates: 18
  • Update frequency: every 20.2 days
  • Top authors: expresstechsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.47MB] [CPU: ▲13.15ms] Passed 4 tests

A check of server-side resources used by Connect GamiPress to Discord
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4649.04 ▲9.69
Dashboard /wp-admin4.81 ▲1.5054.87 ▲6.67
Posts /wp-admin/edit.php4.86 ▲1.5060.38 ▲17.03
Add New Post /wp-admin/post-new.php7.37 ▲1.48107.48 ▲19.21
Media Library /wp-admin/upload.php4.67 ▲1.4452.94 ▲21.19
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.8351.64
Discord Settings /wp-admin/admin.php?page=connect-gamipress-discord-addon4.7186.51

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

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/connect-gamipress-and-discord/" and "wp-content/uploads/"
    • (new file) wp-content/6963e479-8503-4fe7-9ace-3fa933e3bbefgamipress_discord_api_logs.txt
Filesystem: 135 new files
Database: 4 new tables, 28 new options
New tables
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_actionscheduler_groups
wp_actionscheduler_actions
New WordPress options
ets_gamipress_discord_connect_button_bg_color
ets_gamipress_discord_deduct_user_points_message
ets_gamipress_discord_disconnect_button_bg_color
ets_gamipress_discord_retry_api_count
db_upgraded
widget_theysaidso_widget
ets_gamipress_discord_uuid_file_name
ets_gamipress_discord_send_deduct_user_points_dm
ets_gamipress_discord_retry_failed_api
action_scheduler_lock_async-request-runner
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Connect GamiPress to Discord
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.27 ▲0.081.64 ▼0.0836.42 ▼6.54
Dashboard /wp-admin2,202 ▲245.61 ▼0.0591.79 ▼23.9640.49 ▼7.23
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0239.26 ▲1.7832.64 ▼3.79
Add New Post /wp-admin/post-new.php1,528 ▼522.95 ▼0.26607.88 ▼29.8844.57 ▼9.57
Media Library /wp-admin/upload.php1,401 ▲74.17 ▼0.0896.48 ▲1.1040.15 ▼2.09
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2491.8123.7828.74
Discord Settings /wp-admin/admin.php?page=connect-gamipress-discord-addon1,8762.9669.7245.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/connect-gamipress-and-discord/uninstall.php+34
    Undefined index: plugin
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
    • wp_actionscheduler_actions
    • wp_actionscheduler_logs
  • Zombie WordPress options detected upon uninstall: 28 options
    • ets_gamipress_discord_disconnect_button_bg_color
    • ets_gamipress_discord_deduct_user_points_message
    • ets_gamipress_discord_send_award_user_points_dm
    • schema-ActionScheduler_StoreSchema
    • ets_gamipress_discord_job_queue_batch_size
    • widget_recent-posts
    • ets_gamipress_discord_award_rank_message
    • can_compress_scripts
    • ets_gamipress_discord_uuid_file_name
    • ets_gamipress_discord_retry_api_count
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/connect-gamipress-and-discord/public/partials/connect-gamipress-discord-addon-public-display.php
  • 51× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ets_gamipress_discord_get_ranks() in wp-content/plugins/connect-gamipress-and-discord/admin/partials/pages/connect-gamipress-discord-role-mapping.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\ActionMigrator' not found in wp-content/plugins/connect-gamipress-and-discord/includes/libraries/action-scheduler/classes/migration/DryRun_ActionMigrator.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=connect-gamipress-discord-addon
    • > Console-api (severe) in unknown
    /wp-content/plugins/connect-gamipress-and-discord/admin/js/connect-gamipress-discord-addon-admin.js?ver=1.0.5 114:12 Object

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

connect-gamipress-and-discord/connect-gamipress-discord-addon.php 85% from 13 tests

"Connect GamiPress to Discord" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("connect-gamipress-and-discord.php" instead of "connect-gamipress-discord-addon.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin9,446 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,9265,7788,313
CSS51320667
JavaScript53414365
Markdown337091
SVG10010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.37
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes84
▷ Abstract classes1517.86%
▷ Concrete classes6982.14%
▷ Final classes00.00%
Methods642
▷ Static methods7010.90%
▷ Public methods48475.39%
▷ Protected methods13420.87%
▷ Private methods243.74%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.38MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon.png99.25KB44.20KB▼ 55.46%
admin/images/ets-logo.png11.34KB7.55KB▼ 33.46%
admin/images/ravisoni.png278.09KB110.22KB▼ 60.36%