78% wc-telegram-bot

Code Review | Đẩy Thông Báo Woocommerce tới Telegram

WordPress plugin Đẩy Thông Báo Woocommerce tới Telegram scored78%from 54 tests.

About plugin

  • Plugin page: wc-telegram-bot
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: May 1, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: cucki314 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /1,231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.04ms] Passed 4 tests

An overview of server-side resources used by Đẩy Thông Báo Woocommerce tới Telegram
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.38 ▲0.11
Dashboard /wp-admin3.36 ▲0.0657.44 ▲7.21
Posts /wp-admin/edit.php3.41 ▲0.0549.22 ▲3.13
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.45 ▼6.79
Media Library /wp-admin/upload.php3.28 ▲0.0536.79 ▼0.61

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Đẩy Thông Báo Woocommerce tới Telegram: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.031.65 ▼0.4137.71 ▼5.95
Dashboard /wp-admin2,206 ▲155.79 ▼0.12104.73 ▲2.8139.67 ▼13.09
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0140.49 ▲2.0234.41 ▼1.30
Add New Post /wp-admin/post-new.php1,514 ▼1917.55 ▼5.25631.91 ▲42.7644.95 ▼3.82
Media Library /wp-admin/upload.php1,391 ▲34.32 ▲0.1897.59 ▼2.9241.49 ▼2.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-telegram-bot/wc-telegram-bot.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-telegram-bot/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: telegram bot, woocommerce to telegram, woocommerce

wc-telegram-bot/index.php 92% from 13 tests

The principal PHP file in "Đẩy Thông Báo Woocommerce tới Telegram" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-telegram-bot.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin373 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2811298
CSS10375

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin