90% webhook-discord

Code Review | Webhook for Discord

WordPress plugin Webhook for Discord scored90%from 54 tests.

About plugin

  • Plugin page: webhook-discord
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2021
  • Latest release: Oct 17, 2023
  • Number of updates: 10
  • Update frequency: every 78.8 days
  • Top authors: monster2408 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,603 total downloads

Benchmarks

Plugin footprint 83% 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.13MB] [CPU: ▼2.17ms] Passed 4 tests

Server-side resources used by Webhook for Discord
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.05 ▼1.13
Dashboard /wp-admin3.43 ▲0.1347.60 ▼4.65
Posts /wp-admin/edit.php3.55 ▲0.1949.48 ▼0.40
Add New Post /wp-admin/post-new.php6.01 ▲0.1396.26 ▼2.51
Media Library /wp-admin/upload.php3.36 ▲0.1338.07 ▲0.19
Webhook for Discord /wp-admin/options-general.php?page=discord-webhook3.3238.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Webhook for Discord: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.121.65 ▼0.0739.90 ▼0.79
Dashboard /wp-admin2,199 ▲225.63 ▲0.0689.56 ▲1.7239.33 ▼4.94
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0239.29 ▲5.0536.19 ▼3.44
Add New Post /wp-admin/post-new.php1,529 ▲123.16 ▲0.05651.44 ▲0.0060.07 ▲5.89
Media Library /wp-admin/upload.php1,407 ▲44.26 ▲0.0694.27 ▼2.2442.37 ▼6.18
Webhook for Discord /wp-admin/options-general.php?page=discord-webhook8611.9921.7927.66

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: chat, webhook, discord

webhook-discord/discord-webhook.php 92% from 13 tests

Analyzing the main PHP file in "Webhook for Discord" version 1.2.2
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("webhook-discord.php" instead of "discord-webhook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,070 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP122314831,026
PO File1121444

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.82
▷ Minimum class complexity3.00
▷ Maximum class complexity37.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods79
▷ Static methods45.06%
▷ Public methods6886.08%
▷ Protected methods78.86%
▷ Private methods45.06%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected