90% gf-discord

Code Review | Add-On for Discord and Gravity Forms

WordPress plugin Add-On for Discord and Gravity Forms scored90%from 54 tests.

About plugin

  • Plugin page: gf-discord
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: May 8, 2023
  • Number of updates: 4
  • Update frequency: every 11.2 days
  • Top authors: apos37 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /302 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.88ms] Passed 4 tests

A check of server-side resources used by Add-On for Discord and Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.73 ▲0.01
Dashboard /wp-admin3.32 ▲0.0151.13 ▼2.17
Posts /wp-admin/edit.php3.37 ▲0.0146.05 ▼5.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.33 ▲3.71
Media Library /wp-admin/upload.php3.24 ▲0.0140.19 ▲6.17

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add-On for Discord and Gravity Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▲0.251.76 ▲0.1049.75 ▲4.83
Dashboard /wp-admin2,192 ▲185.59 ▲0.0693.10 ▲3.3549.64 ▲8.22
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0337.92 ▼2.8735.25 ▼0.78
Add New Post /wp-admin/post-new.php1,526 ▼823.09 ▲5.05680.07 ▲8.8951.19 ▼15.95
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.01102.07 ▲0.3444.08 ▼5.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: forms, chat, webhook, discord, gravity...

gf-discord/gf-discord.php Passed 13 tests

The entry point to "Add-On for Discord and Gravity Forms" version 1.0.3 is a PHP file that has certain tags in its header comment area
46 characters long description:
Send Gravity Form entries to a Discord channel

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
There were no executable files found in this plugin858 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3256449833
JavaScript14424
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity54.00
▷ Minimum class complexity2.00
▷ Maximum class complexity106.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/discord-logo.png2.00KB1.95KB▼ 2.97%
img/wordpress-logo.png17.51KB6.58KB▼ 62.43%