68% userchat

Code Review | UserChat

WordPress plugin UserChat scored68%from 54 tests.

About plugin

  • Plugin page: userchat
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.7
  • WordPress version: 6.3.1
  • First release: Sep 19, 2018
  • Latest release: Jun 21, 2021
  • Number of updates: 10
  • Update frequency: every 100.6 days
  • Top authors: ar2net (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,084 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼39.05ms] Passed 4 tests

Analyzing server-side resources used by UserChat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.23 ▼2.05
Dashboard /wp-admin3.03 ▼0.2722.33 ▼29.91
Posts /wp-admin/edit.php3.03 ▼0.3326.98 ▼28.47
Add New Post /wp-admin/post-new.php3.03 ▼2.8619.83 ▼83.45
Media Library /wp-admin/upload.php3.03 ▼0.2022.15 ▼14.36
UserChat /wp-admin/options-general.php?page=userchat3.0323.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for UserChat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.34 ▼0.392.01 ▲0.2939.48 ▼1.82
Dashboard /wp-admin2,206 ▲265.65 ▼0.0294.36 ▲2.8642.22 ▼0.66
Posts /wp-admin/edit.php2,111 ▲112.01 ▲0.0038.91 ▼0.5335.26 ▼4.72
Add New Post /wp-admin/post-new.php1,535 ▲923.19 ▼0.50647.74 ▼40.5165.20 ▲7.87
Media Library /wp-admin/upload.php1,405 ▲54.15 ▼0.04100.30 ▼15.0243.51 ▼3.66
UserChat /wp-admin/options-general.php?page=userchat8562.0128.9328.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=userchat
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/userchat/userchat.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
1 plugin tags: userchat

userchat/userchat.php Passed 13 tests

The main file in "UserChat" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
30 characters long description:
UserChat - Chat via messengers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected419 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16212228
PO File23234148
CSS10030
JavaScript13113

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png1.12KB0.39KB▼ 64.93%