90% live-members-counter-for-discord

Code Review | Live Members Counter For Discord

WordPress plugin Live Members Counter For Discord scored90%from 54 tests.

About plugin

  • Plugin page: live-members-coun...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Sep 17, 2020
  • Number of updates: 4
  • Update frequency: every 7.5 days
  • Top authors: sudoshreyansh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,817 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Live Members Counter For Discord
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.27 ▼2.32
Dashboard /wp-admin3.37 ▲0.0746.80 ▼0.68
Posts /wp-admin/edit.php3.48 ▲0.1348.66 ▲1.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.34 ▼12.79
Media Library /wp-admin/upload.php3.29 ▲0.0734.59 ▼0.70
Members Counter /wp-admin/options-general.php?page=dlmc3.2633.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Live Members Counter For Discord
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.54 ▼0.911.73 ▼0.3444.08 ▲1.06
Dashboard /wp-admin2,208 ▲175.96 ▲1.13119.28 ▲8.8640.63 ▼4.57
Posts /wp-admin/edit.php2,097 ▲112.03 ▲0.0140.23 ▲4.3634.98 ▲1.37
Add New Post /wp-admin/post-new.php1,530 ▼1418.22 ▲0.06604.95 ▼4.5347.96 ▼7.69
Media Library /wp-admin/upload.php1,399 ▲84.24 ▲0.0796.79 ▼7.3941.62 ▼1.24
Members Counter /wp-admin/options-general.php?page=dlmc8802.0622.7034.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: discord, shortcode, discord server members, discord server, live counter...

live-members-counter-for-discord/index.php 92% from 13 tests

The main PHP script in "Live Members Counter For Discord" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("live-members-counter-for-discord.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin414 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5648336
CSS111051
JavaScript14027

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.33
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods23100.00%
▷ Public methods1147.83%
▷ Protected methods00.00%
▷ Private methods1252.17%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
There were not PNG files found in your plugin