84% wptelegram-comments

Code Review | WP Telegram Comments

WordPress plugin WP Telegram Comments scored84%from 54 tests.

About plugin

  • Plugin page: wptelegram-comments
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: May 20, 2023
  • Number of updates: 23
  • Update frequency: every 58.9 days
  • Top authors: manzoorwani.jk (82.61%)wpsocio (21.74%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /7,930 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.45ms] Passed 4 tests

A check of server-side resources used by WP Telegram Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1342.46 ▼1.12
Dashboard /wp-admin3.45 ▲0.1446.53 ▼1.83
Posts /wp-admin/edit.php3.56 ▲0.2050.28 ▲2.97
Add New Post /wp-admin/post-new.php6.09 ▲0.2087.33 ▼5.80
Media Library /wp-admin/upload.php3.37 ▲0.1442.45 ▲8.82
Telegram Comments /wp-admin/admin.php?page=wptelegram_comments3.3933.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Telegram Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6413.54 ▼0.861.67 ▼0.5340.52 ▲0.43
Dashboard /wp-admin2,224 ▲425.81 ▼0.04102.56 ▼1.4938.52 ▼3.11
Posts /wp-admin/edit.php2,110 ▲212.06 ▲0.0640.44 ▲2.7734.85 ▲2.36
Add New Post /wp-admin/post-new.php1,546 ▲3223.12 ▲5.59639.60 ▼43.7069.76 ▲8.65
Media Library /wp-admin/upload.php1,409 ▲214.24 ▼0.0292.73 ▼11.9939.14 ▼5.13
Telegram Comments /wp-admin/admin.php?page=wptelegram_comments1,4598.63304.17138.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wptelegram-comments/includes/restApi/RESTController.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/wptelegram-comments/uninstall.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPTelegram\\Comments\\includes\\BaseClass' not found in wp-content/plugins/wptelegram-comments/admin/Admin.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptelegram-comments/languages/wptelegram-comments-js-translations.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPTelegram\\Comments\\includes\\BaseClass' not found in wp-content/plugins/wptelegram-comments/shared/Shared.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPTelegram\\Comments\\includes\\restApi\\RESTController' not found in wp-content/plugins/wptelegram-comments/includes/restApi/SettingsController.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WPTelegram\\Comments\\includes\\BaseClass' not found in wp-content/plugins/wptelegram-comments/includes/AssetManager.php:26

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: widget, social, discuss, telegram, comments

wptelegram-comments/wptelegram-comments.php Passed 13 tests

The principal PHP file in "WP Telegram Comments" v. 1.1.8 is loaded by WordPress automatically on each request
88 characters long description:
Add comments to posts/pages on your WordPress website by using Telegram Comments Widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,530 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PO File95406211,399
PHP213561,230941
SVG101108
Markdown142045
CSS30120
JSON10016
JavaScript1021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods94
▷ Static methods1515.96%
▷ Public methods8287.23%
▷ Protected methods11.06%
▷ Private methods1111.70%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants631.58%
▷ Class constants1368.42%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons/icon-36x34.png2.03KB1.88KB▼ 7.13%
assets/icons/icon-128x128.png6.67KB3.58KB▼ 46.27%