84% wp-discord-invite

Code Review | WP Discord Invite

WordPress plugin WP Discord Invite scored84%from 54 tests.

About plugin

  • Plugin page: wp-discord-invite
  • Plugin version: 2.5.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Jan 7, 2021
  • Latest release: Oct 11, 2023
  • Number of updates: 21
  • Update frequency: every 48.0 days
  • Top authors: sarveshmrao (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /5,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP Discord Invite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.66 ▲5.02
Dashboard /wp-admin3.33 ▲0.0346.21 ▼4.96
Posts /wp-admin/edit.php3.38 ▲0.0352.22 ▼2.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.50 ▼15.58
Media Library /wp-admin/upload.php3.26 ▲0.0337.34 ▲2.91
Click Count /wp-admin/admin.php?page=wp-discord-invite-count3.2233.75
WP Discord Invite /wp-admin/admin.php?page=wp-discord-invite3.2335.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 10 new options
New WordPress options
smr_discord_link_last_click
db_upgraded
smr_discord_uri
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
smr_discord_click_count_last_reset
widget_theysaidso_widget
smr_discord_click_count

Browser metrics Passed 4 tests

Checking browser requirements for WP Discord Invite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10013.44 ▼0.712.13 ▲0.4344.15 ▲6.95
Dashboard /wp-admin2,267 ▲645.04 ▼0.84110.76 ▲7.4538.16 ▼7.87
Posts /wp-admin/edit.php2,151 ▲482.32 ▲0.2839.20 ▼2.7136.79 ▼2.06
Add New Post /wp-admin/post-new.php1,562 ▲3123.54 ▲0.36670.96 ▼12.1137.38 ▼22.19
Media Library /wp-admin/upload.php1,446 ▲464.53 ▲0.29103.09 ▼9.7746.49 ▼0.70
Click Count /wp-admin/admin.php?page=wp-discord-invite-count1,0092.0028.4434.18
WP Discord Invite /wp-admin/admin.php?page=wp-discord-invite1,1902.3741.9536.23

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
  • Zombie WordPress options detected upon uninstall: 10 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • smr_discord_click_count_last_reset
    • smr_discord_click_count
    • smr_discord_link_last_click
    • widget_recent-posts
    • theysaidso_admin_options
    • smr_discord_uri
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-discord-invite/includes/helpPage.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: discord invite links, url, link, discord, vanity...

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

The main PHP script in "WP Discord Invite" version 2.5.2 is automatically included on every request by WordPress
37 characters long description:
Easily add vanity URL in your WP Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin573 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11106144490
CSS20062
SVG10118
JavaScript1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
9 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png33.77KB12.85KB▼ 61.94%
assets/icon-128x128.png6.79KB3.53KB▼ 48.11%
assets/icon-256x256.png21.28KB8.74KB▼ 58.93%
assets/screenshot-5.png16.56KB6.44KB▼ 61.14%
assets/screenshot-4.png45.65KB19.21KB▼ 57.92%