68% bots-master

Code Review | Telegram Bot Master

WordPress plugin Telegram Bot Master scored68%from 54 tests.

About plugin

  • Plugin page: bots-master
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2022
  • Latest release: Sep 27, 2022
  • Number of updates: 20
  • Update frequency: every 8.8 days
  • Top authors: webxid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,382 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.36MB] [CPU: ▼12.06ms] Passed 4 tests

Server-side resources used by Telegram Bot Master
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2445.15 ▲6.64
Dashboard /wp-admin3.65 ▲0.3545.83 ▲0.69
Posts /wp-admin/edit.php3.70 ▲0.3549.16 ▲4.58
Add New Post /wp-admin/post-new.php3.51 ▼2.3838.05 ▼54.94
Media Library /wp-admin/upload.php3.57 ▲0.3536.74 ▲1.43
⚙️ Bot Settings /wp-admin/admin.php?page=bots-master3.5233.15
📢 Channels /wp-admin/admin.php?page=bots-master-channels-list3.8435.74
🚀 Send Message /wp-admin/admin.php?page=bots-master-send-message3.5234.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 396 new files
Database: 1 new table, 8 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Telegram Bot Master
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7714.41 ▲0.051.77 ▼0.0643.65 ▲6.12
Dashboard /wp-admin2,247 ▲695.64 ▼0.02108.75 ▲9.0892.43 ▲45.54
Posts /wp-admin/edit.php2,152 ▲521.99 ▼0.0337.54 ▲2.7137.52 ▼3.17
Add New Post /wp-admin/post-new.php1,568 ▲3323.11 ▲4.70679.84 ▲56.16165.78 ▲101.28
Media Library /wp-admin/upload.php1,449 ▲524.23 ▼0.0296.06 ▼3.1977.26 ▲33.89
⚙️ Bot Settings /wp-admin/admin.php?page=bots-master1,4229.41184.5180.84
📢 Channels /wp-admin/admin.php?page=bots-master-channels-list1,3279.01162.5972.95
🚀 Send Message /wp-admin/admin.php?page=bots-master-send-message1,59010.7289.5547.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wx_bot_users
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • welcome_message
    • unknown_message
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 208× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Commands\\SystemCommand' not found in wp-content/plugins/bots-master/vendor/longman/telegram-bot/src/Commands/SystemCommands/CallbackqueryCommand.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Entities\\Entity' not found in wp-content/plugins/bots-master/vendor/longman/telegram-bot/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFiles.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Entities\\Entity' not found in wp-content/plugins/bots-master/vendor/longman/telegram-bot/src/Entities/Animation.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WebXID\\EDMo\\AbstractClass\\BasicEntity' not found in wp-content/plugins/bots-master/vendor/webxid/edmo/src/AbstractClass/MultiKeyModel.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Entities\\Entity' not found in wp-content/plugins/bots-master/vendor/longman/telegram-bot/src/Entities/Video.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Entities\\Entity' not found in wp-content/plugins/bots-master/vendor/longman/telegram-bot/src/Entities/User.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bots-master/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WebXID\\EDMo\\AbstractClass\\BasicDataContainer' not found in wp-content/plugins/bots-master/vendor/webxid/edmo/src/Rules/Type.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/bots-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WebXID\\EDMo\\AbstractClass\\BasicDataContainer' not found in wp-content/plugins/bots-master/app/BotsMaster.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=bots-master-channels-list
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=bots-master-channels-list 265:0 Uncaught ReferenceError: ClassicEditor is not defined


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === bots-master === )
The official readme.txt is a good inspiration

bots-master/bots-master.php Passed 13 tests

"Telegram Bot Master" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
64 characters long description:
The plugin helps to send a message to a Telegram Bot subscribers

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
Good job! No executable or dangerous file extensions detected26,817 lines of code in 376 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.56
▷ Minimum class complexity1.00
▷ Maximum class complexity146.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
▷ Abstract classes186.95%
▷ Concrete classes24193.05%
▷ Final classes3414.11%
▷ Static methods32522.78%
▷ Public methods1,18082.69%
▷ Protected methods1067.43%
▷ Private methods1419.88%
▷ Named functions4027.97%
▷ Anonymous functions10372.03%
▷ Global constants53.07%
▷ Class constants15896.93%
▷ Public constants14793.04%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png6.64KB4.08KB▼ 38.54%