83% chatbot-for-telegram

Code Review | ChatBot for Telegram

WordPress plugin ChatBot for Telegram scored83%from 54 tests.

About plugin

  • Plugin page: chatbot-for-telegram
  • Plugin version: 0.9.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 10, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 9
  • Update frequency: every 64.2 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads


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
Installer ran successfully

Server metrics [RAM: ▼0.39MB] [CPU: ▼18.02ms] Passed 4 tests

An overview of server-side resources used by ChatBot for Telegram
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2643.02 ▲2.53
Dashboard /wp-admin3.65 ▲0.3148.96 ▼15.36
Posts /wp-admin/edit.php3.70 ▲0.3554.63 ▲1.64
Add New Post /wp-admin/post-new.php3.47 ▼2.4241.87 ▼60.88
Media Library /wp-admin/upload.php3.51 ▲0.2838.00 ▲4.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ChatBot for Telegram
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.23 ▲0.131.92 ▲0.3139.09 ▼1.63
Dashboard /wp-admin2,215 ▲385.56 ▼0.1291.91 ▼0.3244.77 ▼1.15
Posts /wp-admin/edit.php2,124 ▲241.99 ▼0.0440.34 ▼1.3237.29 ▲1.39
Add New Post /wp-admin/post-new.php1,547 ▲1923.41 ▲0.44661.60 ▲20.9472.13 ▲16.60
Media Library /wp-admin/upload.php1,423 ▲294.21 ▲0.0097.60 ▼1.2443.66 ▲1.02

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbot-for-telegram/includes/admin/menu.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbot-for-telegram/includes/class-webhook.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/chatbot-for-telegram/includes/admin/templates/settings.php:2

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


Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: telegram chatbot, chatbot, bot telegram, telegram bot, telegram

chatbot-for-telegram/init.php 69% from 13 tests

Analyzing the main PHP file in "ChatBot for Telegram" version 0.9.8
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("4.9" instead of "4.6")
  • Main file name: The principal plugin file should be the same as the plugin slug ("chatbot-for-telegram.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,539 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
▷ Static methods12.13%
▷ Public methods4289.36%
▷ Protected methods00.00%
▷ Private methods510.64%
▷ Named functions2592.59%
▷ Anonymous functions27.41%
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin