90% discord-display

Code Review | Discord Display

WordPress plugin Discord Display scored90%from 54 tests.

About plugin

  • Plugin page: discord-display
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2015
  • Latest release: Oct 28, 2017
  • Number of updates: 6
  • Update frequency: every 117.0 days
  • Top authors: evertiro (66.67%)section214 (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.58ms] Passed 4 tests

This is a short check of server-side resources used by Discord Display
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.43 ▼3.95
Dashboard /wp-admin3.37 ▲0.0749.96 ▼8.79
Posts /wp-admin/edit.php3.49 ▲0.1353.26 ▲1.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0792.23 ▼14.74
Media Library /wp-admin/upload.php3.30 ▲0.0740.51 ▲4.99

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Discord Display
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.74 ▲0.451.74 ▼0.3835.71 ▼7.97
Dashboard /wp-admin2,195 ▲155.61 ▲0.0591.68 ▼1.6138.18 ▼6.06
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0342.47 ▲8.4039.10 ▼1.54
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▼0.08643.26 ▼49.8856.26 ▲7.28
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0494.16 ▼16.6046.61 ▼2.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_discord_display_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
4 plugin tags: team speak, discord, teamspeak, mumble

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

The main PHP file in "Discord Display" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
Provides a simple native widget for displaying your Discord server

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
Good job! No executable or dangerous file extensions detected323 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5107190276
CSS115447

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.67
▷ Minimum class complexity3.00
▷ Maximum class complexity52.00
Average method complexity6.60
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin