78% connect-with-telegram

Code Review | Connect With Telegram

WordPress plugin Connect With Telegram scored 78% from 54 tests.

About plugin

  • Plugin page: connect-with-tele...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 5.8.1
  • First release: Feb 15, 2016
  • Latest release: Feb 16, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Goback2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,785 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼138.95ms] Passed 4 tests

A check of server-side resources used by Connect With Telegram
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2338.78 ▲15.51
Dashboard /wp-admin3.17 ▲0.1255.62 ▼0.25
Posts /wp-admin/edit.php3.28 ▲0.1853.42 ▲2.66
Add New Post /wp-admin/post-new.php5.53 ▲0.10102.31 ▼569.25
Media Library /wp-admin/upload.php3.12 ▲0.1248.71 ▲11.05
Connect With Telegram /wp-admin/options-general.php?page=dimwwt-menu3.0738.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, no new options
New tables
wp_dimwwt_requests

Browser metrics Passed 4 tests

Connect With Telegram: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲14316.01 ▲0.6614.34 ▲3.4750.03 ▼3.14
Dashboard /wp-admin2,979 ▲455.93 ▼0.03154.15 ▼11.81131.76 ▲7.33
Posts /wp-admin/edit.php2,751 ▲122.74 ▲0.0373.30 ▼1.7994.97 ▼9.37
Add New Post /wp-admin/post-new.php1,625 ▼5821.65 ▲3.26337.22 ▼94.76115.07 ▼6.11
Media Library /wp-admin/upload.php1,819 ▲715.07 ▲0.04157.96 ▼13.68125.21 ▼10.06
Connect With Telegram /wp-admin/options-general.php?page=dimwwt-menu1,1902.3375.5093.90

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
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dimwwt_requests

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=dimwwt-menu
    • > Notice in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-admin-menu.php+183
    Undefined index: bot-token

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
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant __dimwwt_dir - assumed '__dimwwt_dir' (this will throw an Error in a future version of PHP) in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-botsaz-listener.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/connect-with-telegram/inc/class-auto-loader.php:21
    • > PHP Warning
      require_once(__dimwwt_dirinc/class-dimwwt-listener.php): failed to open stream: No such file or directory in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-botsaz-listener.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/connect-with-telegram/index.php:47
    • > PHP Fatal error
      require_once(): Failed opening required '__dimwwt_dirinc/class-dimwwt-listener.php' (include_path='.:/usr/share/php') in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-telegram-listener.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '__dimwwt_dirinc/class-dimwwt-listener.php' (include_path='.:/usr/share/php') in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-botsaz-listener.php on line 2
    • > PHP Warning
      require_once(__dimwwt_dirinc/class-dimwwt-listener.php): failed to open stream: No such file or directory in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-telegram-listener.php on line 2
    • > PHP Warning
      Use of undefined constant __dimwwt_dir - assumed '__dimwwt_dir' (this will throw an Error in a future version of PHP) in wp-content/plugins/connect-with-telegram/inc/class-dimwwt-telegram-listener.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
3 plugin tags: bot, telegram, wordpress

connect-with-telegram/index.php 85% from 13 tests

The principal PHP file in "Connect With Telegram" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("connect-with-telegram.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,134 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP91511471,023
PO File124747883
CSS11016
JavaScript21012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.12
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods4289.36%
▷ Protected methods00.00%
▷ Private methods510.64%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There are no PNG files in this plugin