73% green-wp-telegram-bot-by-teplitsa

Code Review | TeploBot - Telegram Bot for WP

WordPress plugin TeploBot - Telegram Bot for WP scored73%from 54 tests.

About plugin

  • Plugin page: green-wp-telegram...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.2
  • WordPress version: 6.3.1
  • First release: May 30, 2016
  • Latest release: Oct 29, 2017
  • Number of updates: 14
  • Update frequency: every 37.3 days
  • Top authors: gsuvorov (78.57%)denis.cherniatev (28.57%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /4,293 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.41MB] [CPU: ▼0.18ms] Passed 4 tests

A check of server-side resources used by TeploBot - Telegram Bot for WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2642.27 ▼1.80
Dashboard /wp-admin3.80 ▲0.5046.74 ▼1.15
Posts /wp-admin/edit.php3.85 ▲0.5049.21 ▲1.83
Add New Post /wp-admin/post-new.php6.32 ▲0.4496.90 ▲0.39
Media Library /wp-admin/upload.php3.66 ▲0.4437.13 ▲3.83
Log /wp-admin/admin.php?page=gwptb_log3.6434.12
Settings /wp-admin/admin.php?page=gwptb3.6439.08
Feedback /wp-admin/admin.php?page=gwptb_feedback3.6331.67

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

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/green-wp-telegram-bot-by-teplitsa/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/green-wp-telegram-bot-by-teplitsa/assets/html/\321\201reate-bot.html"
Filesystem: 34 new files
Database: 2 new tables, 9 new options
New tables
wp_gwptb_log
wp_gwptb_chat_subscription
New WordPress options
can_compress_scripts
theysaidso_admin_options
gwptb_permalinks_flushed
widget_recent-posts
gwptb_version
widget_theysaidso_widget
widget_recent-comments
gwptb_stats
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TeploBot - Telegram Bot for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.19 ▼1.491.65 ▼0.1343.55 ▼2.21
Dashboard /wp-admin2,234 ▲604.88 ▼0.01104.63 ▼9.3439.97 ▼10.66
Posts /wp-admin/edit.php2,120 ▲281.97 ▼0.0433.96 ▼4.6132.22 ▲0.43
Add New Post /wp-admin/post-new.php1,544 ▲2523.19 ▲0.03610.44 ▼79.6652.43 ▼1.90
Media Library /wp-admin/upload.php1,422 ▲344.15 ▼0.0995.33 ▼11.6942.86 ▼2.98
Log /wp-admin/admin.php?page=gwptb_log9762.2026.6028.92
Settings /wp-admin/admin.php?page=gwptb1,2352.2330.4537.35
Feedback /wp-admin/admin.php?page=gwptb_feedback8982.0425.0530.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_gwptb_log
    • wp_gwptb_chat_subscription
  • The uninstall procedure has failed, leaving 9 options in the database
    • gwptb_permalinks_flushed
    • widget_recent-comments
    • gwptb_stats
    • widget_recent-posts
    • theysaidso_admin_options
    • gwptb_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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)
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/green-wp-telegram-bot-by-teplitsa/inc/class-cssjs.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: robot, telegram, bot, chatbot, messenger

green-wp-telegram-bot-by-teplitsa/gwptb.php 85% from 13 tests

The main PHP file in "TeploBot - Telegram Bot for WP" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("green-wp-telegram-bot-by-teplitsa.php" instead of "gwptb.php")

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
Success! There were no dangerous files found in this plugin3,611 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP137482912,020
CSS213123586
PO File1155243365
Sass3763309
JavaScript25374157
Markdown154086
JSON20049
HTML219039

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity29.89
▷ Minimum class complexity1.00
▷ Maximum class complexity118.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods110
▷ Static methods2724.55%
▷ Public methods7870.91%
▷ Protected methods2421.82%
▷ Private methods87.27%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-itv.png15.53KB5.10KB▼ 67.15%
assets/img/botfather.png39.09KB40.30KB0.00%