84% wc-discord-invite

Code Review | WC Discord invite

WordPress plugin WC Discord invite scored84%from 54 tests.

About plugin

  • Plugin page: wc-discord-invite
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 20, 2018
  • Latest release: Feb 20, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: nicolamustone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,146 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.00MB] [CPU: ▼6.95ms] Passed 4 tests

A check of server-side resources used by WC Discord invite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.99 ▼0.12
Dashboard /wp-admin3.31 ▼0.0358.47 ▼7.18
Posts /wp-admin/edit.php3.36 ▲0.0150.69 ▼3.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.04 ▼16.68
Media Library /wp-admin/upload.php3.24 ▲0.0139.18 ▼0.84

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WC Discord invite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.181.49 ▼0.0242.75 ▲1.45
Dashboard /wp-admin2,195 ▲185.62 ▼0.2293.26 ▼1.7742.46 ▲0.39
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0139.03 ▼0.6835.55 ▼2.75
Add New Post /wp-admin/post-new.php1,531 ▲523.28 ▲0.04664.77 ▼12.1151.70 ▼2.87
Media Library /wp-admin/upload.php1,397 ▼04.18 ▲0.0295.47 ▼39.7143.13 ▼13.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/wc-discord-invite/class-wc-integration-discord-invite.php:8

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: streaming, email, woocommerce, chat, server...

wc-discord-invite/wc-discord-invite.php 92% from 13 tests

"WC Discord invite" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

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
Everything looks great! No dangerous files found in this plugin172 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP552118172

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected