74% miniorange-discord-integration

Code Review | miniOrange Discord Integration

WordPress plugin miniOrange Discord Integration scored 74% from 54 tests.

About plugin

  • Plugin page: miniorange-discor...
  • Plugin version: 2.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 14
  • Update frequency: every 26.4 days
  • Top authors: cyberorange (85.71%)cyberlord92 (14.29%)miniorangesecurity (14.29%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 1,971 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▲1.95ms] Passed 4 tests

Server-side resources used by miniOrange Discord Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7847.20 ▲4.86
Dashboard /wp-admin4.12 ▲0.8257.09 ▲5.32
Posts /wp-admin/edit.php4.16 ▲0.8054.13 ▲4.61
Add New Post /wp-admin/post-new.php6.73 ▲0.8589.31 ▼7.00
Media Library /wp-admin/upload.php4.02 ▲0.7940.15 ▲6.26

Server storage [IO: ▲3.43MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 60 new files
Database: 1 new table, 42 new options
New tables
wp_mo_discord_linked_user
New WordPress options
mo_discord_default_login_enable
widget_recent-posts
mo_login_icon_space
mo_discord_login_button_customize_text
mo_discord_bootstrap_load
mo_discord_integrator_version
mo_discord_attr_username
mo_discord_fonawesome_load
mo_default_role
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by miniOrange Discord Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16413.54 ▼1.0110.85 ▲8.7646.76 ▼1.96
Dashboard /wp-admin2,221 ▲364.87 ▼0.0395.62 ▼7.7078.62 ▲35.36
Posts /wp-admin/edit.php2,104 ▲151.97 ▼0.0438.05 ▲3.4435.07 ▼0.48
Add New Post /wp-admin/post-new.php1,535 ▲2118.17 ▲0.50699.91 ▲36.3453.55 ▼5.08
Media Library /wp-admin/upload.php1,403 ▲154.23 ▼0.04118.01 ▲24.9746.12 ▲6.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mo_discord_linked_user
  • The uninstall procedure has failed, leaving 14 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • app_pos
    • mo_discord_login_field_option
    • widget_theysaidso_widget
    • mo_default_role
    • widget_mo_discord_login_wid
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • ...

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 no errors were found, this is by no means an exhaustive test

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miniorange-discord-integration/class-mo-discord-login-wid.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/miniorange-discord-integration/view/support_form/miniorange-discord-support-form.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/miniorange-discord-integration/view/support_form/miniorange-discord-support-form.php on line 13
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/miniorange-discord-integration/view/support_form/miniorange-discord-support-form.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/miniorange-discord-integration/miniorange_discord_sso_settings.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: discord login, login, sso, discord avatar, discord

miniorange-discord-integration/miniorange_discord_sso_settings.php 92% from 13 tests

"miniOrange Discord Integration" version 2.1.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("miniorange-discord-integration.php" instead of "miniorange_discord_sso_settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected13,700 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
PHP193857404,138
CSS8038
JavaScript2082

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity53.25
▷ Minimum class complexity13.00
▷ Maximum class complexity101.00
Average method complexity7.15
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions55
▷ Named functions5498.18%
▷ Anonymous functions11.82%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/connect1.png35.26KB21.59KB▼ 38.76%
includes/images/miniOrange.png3.94KB2.26KB▼ 42.53%
includes/images/woocommerce.png25.04KB7.39KB▼ 70.48%
includes/images/wrong.png30.98KB13.50KB▼ 56.42%
includes/images/wordpress.png18.19KB5.97KB▼ 67.16%