84% wps-telegram-chat

Code Review | WPS Telegram Chat

WordPress plugin WPS Telegram Chat scored84%from 54 tests.

About plugin

  • Plugin page: wps-telegram-chat
  • Plugin version: 4.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Sep 23, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 25
  • Update frequency: every 16.3 days
  • Top authors: wpsolution (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /3,662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.97ms] Passed 4 tests

An overview of server-side resources used by WPS Telegram Chat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.19 ▼0.42
Dashboard /wp-admin3.41 ▲0.0749.65 ▼12.42
Posts /wp-admin/edit.php3.53 ▲0.1744.40 ▼4.25
Add New Post /wp-admin/post-new.php5.99 ▲0.1180.46 ▼16.58
Media Library /wp-admin/upload.php3.33 ▲0.1133.71 ▼2.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
wps-telegram-chat
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPS Telegram Chat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6114.67 ▲0.321.92 ▲0.1942.88 ▼3.04
Dashboard /wp-admin2,216 ▲395.59 ▼0.0692.75 ▼1.0146.26 ▲7.24
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0533.65 ▼7.7239.02 ▲1.50
Add New Post /wp-admin/post-new.php1,546 ▲1923.17 ▲0.04675.23 ▼20.4365.47 ▲14.20
Media Library /wp-admin/upload.php1,415 ▲124.20 ▼0.05101.21 ▼3.1644.68 ▼2.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wps-telegram-chat/public/partials/wps-telegram-chat-public-handler.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wps-telegram-chat/admin/partials/wps-telegram-chat-notice.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wps-telegram-chat/public/partials/wps-telegram-chat-shortcodes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wps-telegram-chat/public/partials/wps-telegram-chat-public-display.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wps-telegram-chat/admin/partials/wps-telegram-chat-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: telegram, contact form, email, live chat, chat bot...

wps-telegram-chat/wps-telegram-chat.php Passed 13 tests

The primary PHP file in "WPS Telegram Chat" version 4.1.1 is used by WordPress to initiate all plugin functionality
121 characters long description:
With a Telegram Chat for website, your site visitors will be able to contact you directly from your website at all times.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,101 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP153176351,305
PO File2192216591
CSS23710584
JavaScript413982521
SVG80399
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin