84% edd-discord-notifications

Code Review | Notifications on Discord for Easy Digital Downloads

WordPress plugin Notifications on Discord for Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: edd-discord-notif...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2021
  • Latest release: Sep 21, 2022
  • Number of updates: 5
  • Update frequency: every 119.2 days
  • Top authors: Jarryd Long (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Notifications on Discord for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.64 ▲3.00
Dashboard /wp-admin3.31 ▲0.0153.54 ▲4.36
Posts /wp-admin/edit.php3.36 ▲0.0147.85 ▼0.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.63 ▼4.89
Media Library /wp-admin/upload.php3.23 ▲0.0133.79 ▲2.13
Discord Notifications /wp-admin/options-general.php?page=edd-discord-notifications3.2534.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Notifications on Discord for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.54 ▼1.051.84 ▲0.0238.72 ▼0.89
Dashboard /wp-admin2,207 ▲224.83 ▼1.0499.57 ▼6.3538.67 ▼7.27
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0140.61 ▼1.4036.50 ▲1.18
Add New Post /wp-admin/post-new.php1,539 ▼323.28 ▲4.98629.79 ▼11.9755.53 ▼1.65
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0995.09 ▼15.5143.59 ▼1.83
Discord Notifications /wp-admin/options-general.php?page=edd-discord-notifications9182.0629.5628.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-discord-notifications/includes/easy-digital-downloads.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/edd-discord-notifications/edd-discord-notifications.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/edd-discord-notifications/includes/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: notifications, discord, edd, easy digital downloads, ecommerce

edd-discord-notifications/edd-discord-notifications.php 92% from 13 tests

The main PHP file in "Notifications on Discord for Easy Digital Downloads" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45928243

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected