78% bot-for-telegram-on-woocommerce

Code Review | Bot for Telegram on WooCommerce

WordPress plugin Bot for Telegram on WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: bot-for-telegram-...
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2021
  • Latest release: Dec 29, 2022
  • Number of updates: 41
  • Update frequency: every 17.2 days
  • Top authors: guruteam (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

500+ active /10,220 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲2.68MB] [CPU: ▲19.86ms] Passed 4 tests

Analyzing server-side resources used by Bot for Telegram on WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1032.36 ▼5.04
Dashboard /wp-admin6.95 ▲3.6582.02 ▲37.93
Posts /wp-admin/edit.php7.03 ▲3.6792.71 ▲48.05
Add New Post /wp-admin/post-new.php9.17 ▲3.29119.48 ▲21.63
Media Library /wp-admin/upload.php6.94 ▲3.7162.54 ▲24.90

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 284 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
bftow_patch_settings
theysaidso_admin_options
bftow_settings
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Bot for Telegram on WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,281 ▲54619.34 ▲4.971.63 ▼0.1238.63 ▼4.75
Dashboard /wp-admin2,670 ▲49610.36 ▲4.36203.57 ▲96.61163.82 ▲122.36
Posts /wp-admin/edit.php2,556 ▲4677.56 ▲5.52127.26 ▲92.12109.38 ▲76.29
Add New Post /wp-admin/post-new.php1,932 ▲39020.58 ▲2.40680.78 ▲10.32213.71 ▲152.33
Media Library /wp-admin/upload.php1,755 ▲3677.82 ▲3.60144.83 ▲32.99126.82 ▲78.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • bftow_settings
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • bftow_patch_settings
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/not_exist.php
  • 123× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/NUXY.php:17
    • > PHP Notice
      Undefined variable: section_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/notice.php on line 12
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/button_group.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bot-for-telegram-on-woocommerce/includes/notices/settings.php:20
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/image_select.php on line 13
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/typography.php on line 14
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/ace_editor.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/range_slider.php:18
    • > PHP Notice
      Undefined variable: section_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/hint.php on line 8
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/bot-for-telegram-on-woocommerce/nuxy/metaboxes/fields/import_export.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

bot-for-telegram-on-woocommerce/bot-for-telegram-on-woocommerce.php Passed 13 tests

"Bot for Telegram on WooCommerce" version 1.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
133 characters long description:
Bot for Telegram on WooCommerce is a plugin that allows you to create a telegram online store based on your website with WooCommerce.

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
No dangerous file extensions were detected143,531 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
JSON50076,788
JavaScript885,0551,69438,382
SVG80129,175
CSS111,46697,860
PHP751,0924335,416
Sass543921084,930
PO File3414447955
Markdown210025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity24.28
▷ Minimum class complexity1.00
▷ Maximum class complexity133.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods160
▷ Static methods3823.75%
▷ Public methods13785.62%
▷ Protected methods21.25%
▷ Private methods2113.12%
Functions51
▷ Named functions3670.59%
▷ Anonymous functions1529.41%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png39.41KB14.70KB▼ 62.69%