90% wp-discord-post

Code Review | WP Discord Post

WordPress plugin WP Discord Post scored90%from 54 tests.

About plugin

  • Plugin page: wp-discord-post
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.7
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Aug 22, 2018
  • Number of updates: 32
  • Update frequency: every 17.7 days
  • Top authors: nicolamustone (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /25,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.18ms] Passed 4 tests

Analyzing server-side resources used by WP Discord Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.10 ▼0.13
Dashboard /wp-admin3.33 ▲0.0356.40 ▲2.41
Posts /wp-admin/edit.php3.38 ▲0.0353.43 ▲1.22
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.22 ▼4.97
Media Library /wp-admin/upload.php3.26 ▲0.0340.85 ▼0.84
WP Discord Post /wp-admin/options-general.php?page=wp-discord-post3.2236.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Discord Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.041.70 ▲0.0844.96 ▲3.55
Dashboard /wp-admin2,202 ▲255.61 ▼0.0397.69 ▲8.6841.50 ▼2.93
Posts /wp-admin/edit.php2,101 ▼21.95 ▲0.0034.57 ▼9.1938.45 ▼0.11
Add New Post /wp-admin/post-new.php1,531 ▲523.36 ▲0.34662.15 ▼81.0859.76 ▲7.28
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.05106.73 ▼11.5348.14 ▲0.26
WP Discord Post /wp-admin/options-general.php?page=wp-discord-post9142.0022.6630.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-discord-post/wp-discord-post.php Passed 13 tests

The main PHP file in "WP Discord Post" ver. 2.1.0 adds more information about the plugin and also serves as the entry point for this plugin
115 characters long description:
A Discord integration that sends a message on your desired Discord server and channel for every new post published.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,124 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP112875211,124

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.90
▷ Minimum class complexity3.00
▷ Maximum class complexity37.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods75
▷ Static methods45.33%
▷ Public methods6485.33%
▷ Protected methods79.33%
▷ Private methods45.33%
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 images were found in this plugin