78% send-chat-tools

Code Review | Send Chat Tools

WordPress plugin Send Chat Tools scored78%from 54 tests.

About plugin

  • Plugin page: send-chat-tools
  • Plugin version: 1.5.4
  • PHP compatiblity: 8.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.3.1
  • WordPress version: 6.3.1
  • First release: May 26, 2021
  • Latest release: Sep 10, 2023
  • Number of updates: 25
  • Update frequency: every 33.5 days
  • Top authors: braveryk7 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,262 total downloads

Benchmarks

Plugin footprint 82% 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.00MB] [CPU: ▼4.17ms] Passed 4 tests

Analyzing server-side resources used by Send Chat Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.56 ▲3.53
Dashboard /wp-admin3.31 ▲0.0049.10 ▼0.19
Posts /wp-admin/edit.php3.36 ▲0.0050.35 ▼4.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.49 ▼10.56
Media Library /wp-admin/upload.php3.23 ▲0.0040.38 ▼0.96

Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification detected: 4 files (0.00KB) outside of "wp-content/plugins/send-chat-tools/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/send-chat-tools/images/banner-772\303\227250.jpg"
    • (new file) "wp-content/plugins/send-chat-tools/images/banner-1554\303\227500.jpg"
    • (new file) "wp-content/plugins/send-chat-tools/images/icon-256\303\227256.jpg"
    • (new file) "wp-content/plugins/send-chat-tools/images/icon-128\303\227128.jpg"
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Send Chat Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.61 ▼0.941.74 ▼0.0839.49 ▼3.39
Dashboard /wp-admin2,209 ▲575.84 ▲0.23101.54 ▼2.7942.87 ▲1.38
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0141.01 ▲2.2536.44 ▲3.65
Add New Post /wp-admin/post-new.php1,533 ▲1421.08 ▲0.10664.19 ▼28.4861.23 ▲5.00
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0198.22 ▼3.8145.17 ▼1.21

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 20× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/send-chat-tools/modules/cancel-activate.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-dashboard-notify.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-const-data.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-activate.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-encryption.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-admin-page.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-discord.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-judgment-php-version.php
    • > /wp-content/plugins/send-chat-tools/class/class-sct-slack.php
    • > /wp-content/plugins/send-chat-tools/send-chat-tools.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/send-chat-tools/class/class-sct-logger.php on line 51
    • > PHP Parse error
      syntax error, unexpected ':', expecting ')' in wp-content/plugins/send-chat-tools/class/class-sct-chatwork.php on line 56
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/send-chat-tools/class/class-sct-error-mail.php on line 64
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/send-chat-tools/class/class-sct-generate-content-abstract.php on line 88
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/send-chat-tools/class/class-sct-developer-notify.php on line 115
    • > PHP Parse error
      syntax error, unexpected ':', expecting ')' in wp-content/plugins/send-chat-tools/class/class-sct-generate-content.php on line 48
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/send-chat-tools/class/class-sct-base.php on line 222

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === send-chat-tools === )
The official readme.txt is a good inspiration

send-chat-tools/send-chat-tools.php Passed 13 tests

"Send Chat Tools" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
A plugin that allows you to send WordPress announcements to chat tools.

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 plugin3,821 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP296201,2253,467
PO File2227420337
JSON20013
JavaScript1003
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.04
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods177
▷ Static methods147.91%
▷ Public methods11363.84%
▷ Protected methods2212.43%
▷ Private methods4223.73%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants521.74%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-1.png56.91KB16.64KB▼ 70.76%
images/screenshot-2.png95.54KB27.93KB▼ 70.76%