68% chat-life-telegram

Code Review | Chat life for telegram

WordPress plugin Chat life for telegram scored68%from 54 tests.

About plugin

  • Plugin page: chat-life-telegram
  • Plugin version: 0.1.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 20, 2022
  • Latest release: Apr 5, 2022
  • Number of updates: 5
  • Update frequency: every 9.2 days
  • Top authors: pechenki (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /840 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.60ms] Passed 4 tests

A check of server-side resources used by Chat life for telegram
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.04 ▲3.99
Dashboard /wp-admin3.34 ▲0.0447.78 ▲6.44
Posts /wp-admin/edit.php3.45 ▲0.1045.28 ▼6.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.20 ▲3.59
Media Library /wp-admin/upload.php3.26 ▲0.0437.78 ▲1.07
Chat-life for telegram /wp-admin/admin.php?page=Chat-life-for-telegram3.2730.84
Chat List /wp-admin/admin.php?page=tcl-chatList3.2532.39

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_tcl_chat
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Chat life for telegram
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6014.47 ▼0.201.65 ▼0.1143.33 ▲2.65
Dashboard /wp-admin2,234 ▲465.77 ▲0.7699.67 ▼17.8638.05 ▼6.99
Posts /wp-admin/edit.php2,117 ▲251.98 ▼0.0635.90 ▼5.4836.56 ▼2.46
Add New Post /wp-admin/post-new.php1,541 ▲2217.45 ▼5.68683.33 ▼5.6353.63 ▼1.04
Media Library /wp-admin/upload.php1,416 ▲254.22 ▲0.01107.60 ▲5.9147.62 ▲2.07
Chat-life for telegram /wp-admin/admin.php?page=Chat-life-for-telegram1,0892.0326.6329.33
Chat List /wp-admin/admin.php?page=tcl-chatList9602.0226.7727.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_tcl_chat
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: list in wp-content/plugins/chat-life-telegram/admin/chat-list.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/chat-life-telegram/admin/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'pechenki\\ChatLifeForTelegram\\src\\ChatCore' not found in wp-content/plugins/chat-life-telegram/src/ControllerTelegramCore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'pechenki\\ChatLifeForTelegram\\src\\ChatCore' not found in wp-content/plugins/chat-life-telegram/src/AdminController.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'pechenki\\ChatLifeForTelegram\\src\\ChatCore' not found in wp-content/plugins/chat-life-telegram/src/ControllerForTelegram.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'pechenki\\ChatLifeForTelegram\\src\\ChatCore' not found in wp-content/plugins/chat-life-telegram/src/Model.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/chat-life-telegram/frontend/Widget.php:116
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/chat-life-telegram/admin/chat-list.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/chat-life-telegram/admin/chat-list.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'pechenki\\ChatLifeForTelegram\\src\\ChatCore' not found in wp-content/plugins/chat-life-telegram/init.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=Chat-life-for-telegram
    • > Javascript (severe) in unknown
    /wp-content/plugins/chat-life-telegram/admin/assets/js/admin-tcl.js?ver=6.3.1 56:17 Uncaught TypeError: Cannot set properties of undefined (setting 'onclick')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt might help

chat-life-telegram/index.php 92% from 13 tests

"Chat life for telegram" version 0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("chat-life-telegram.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin16,108 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41931,92414,044
CSS4224161,006
PHP11235310995
SVG10052
Markdown17011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.33
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods51
▷ Static methods59.80%
▷ Public methods4282.35%
▷ Protected methods47.84%
▷ Private methods59.80%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin