84% wc-telegram

Code Review | Sell via Telegram for WooCommerce

WordPress plugin Sell via Telegram for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-telegram
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Aug 8, 2021
  • Number of updates: 13
  • Update frequency: every 27.7 days
  • Top authors: bot11x11 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,349 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.04MB] [CPU: ▼1.40ms] Passed 4 tests

Server-side resources used by Sell via Telegram for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.15 ▼0.69
Dashboard /wp-admin3.35 ▲0.0446.29 ▼5.40
Posts /wp-admin/edit.php3.40 ▲0.0446.78 ▼1.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.07 ▲5.19
Media Library /wp-admin/upload.php3.27 ▲0.0434.53 ▲1.83

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Sell via Telegram for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.041.67 ▼0.0940.98 ▼3.87
Dashboard /wp-admin2,203 ▲185.83 ▼0.0297.93 ▼1.9937.72 ▼4.13
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0432.98 ▼5.1835.09 ▼1.46
Add New Post /wp-admin/post-new.php1,514 ▼3017.69 ▼0.15587.76 ▼28.0049.98 ▼5.01
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0394.68 ▼15.1242.02 ▼0.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Telegram_API' not found in wp-content/plugins/wc-telegram/includes/class-wc-telegram-user.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Telegram_User' not found in wp-content/plugins/wc-telegram/includes/class-wc-telegram-bot.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wc-telegram/wc-telegram.php:22

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
The official readme.txt might help

wc-telegram/wc-telegram.php Passed 13 tests

This is the main PHP file of "Sell via Telegram for WooCommerce" version 1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
The plugin helps you sell anything via Telegram

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,026 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP656712,026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity65.50
▷ Minimum class complexity10.00
▷ Maximum class complexity204.00
Average method complexity6.61
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods69
▷ Static methods11.45%
▷ Public methods5681.16%
▷ Protected methods11.45%
▷ Private methods1217.39%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin