78% simple-discord-sso

Code Review | Simple Discord SSO ( Single Sign-On )

WordPress plugin Simple Discord SSO ( Single Sign-On ) scored78%from 54 tests.

About plugin

  • Plugin page: simple-discord-sso
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2022
  • Latest release: Jan 20, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: jaycodez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.45ms] Passed 4 tests

Server-side resources used by Simple Discord SSO ( Single Sign-On )
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.83 ▼1.07
Dashboard /wp-admin3.42 ▲0.1252.46 ▼3.75
Posts /wp-admin/edit.php3.54 ▲0.1861.70 ▲7.66
Add New Post /wp-admin/post-new.php6.00 ▲0.12101.69 ▼6.15
Media Library /wp-admin/upload.php3.34 ▲0.1241.73 ▲1.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
simple_discord_permalinks
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Discord SSO ( Single Sign-On )
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.93 ▼0.428.68 ▲6.5942.83 ▼2.77
Dashboard /wp-admin2,208 ▲315.63 ▼0.0290.74 ▼13.2039.42 ▼4.47
Posts /wp-admin/edit.php2,121 ▲211.97 ▲0.0238.57 ▲1.2131.67 ▼1.78
Add New Post /wp-admin/post-new.php1,548 ▲2018.44 ▼2.54621.48 ▼84.0180.47 ▲24.10
Media Library /wp-admin/upload.php1,416 ▲194.18 ▲0.0496.33 ▼14.7140.84 ▼6.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • simple_discord_permalinks
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-discord-sso/src/views/settings.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function com\\plugish\\discord\\sso\\add_action() in wp-content/plugins/simple-discord-sso/plugin.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: discord, social login, discord server, discord login

simple-discord-sso/plugin.php 92% from 13 tests

The main PHP file in "Simple Discord SSO ( Single Sign-On )" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-discord-sso.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected933 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP15255303819
JavaScript560107
JSON1004
SVG3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1527.27%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin