84% notification-for-telegram

Code Review | Notification for Telegram

WordPress plugin Notification for Telegram scored84%from 54 tests.

About plugin

  • Plugin page: notification-for-...
  • Plugin version: 3.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 66
  • Update frequency: every 17.4 days
  • Top authors: rainafarai (100%)

Code review

54 tests

User reviews

60 reviews

Install metrics

2,000+ active /16,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼12.35ms] Passed 4 tests

Server-side resources used by Notification for Telegram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.38 ▼6.39
Dashboard /wp-admin3.29 ▼0.0232.42 ▼15.34
Posts /wp-admin/edit.php3.35 ▼0.0034.54 ▼10.89
Add New Post /wp-admin/post-new.php5.53 ▼0.3672.90 ▼16.79
Media Library /wp-admin/upload.php3.29 ▲0.0630.05 ▲0.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Notification for Telegram: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.34 ▼0.051.64 ▼0.0641.03 ▼1.74
Dashboard /wp-admin2,220 ▲405.69 ▲0.0592.55 ▲3.2081.77 ▲43.95
Posts /wp-admin/edit.php2,125 ▲252.10 ▲0.1639.51 ▲1.4034.96 ▼1.11
Add New Post /wp-admin/post-new.php1,702 ▲17122.13 ▼0.60714.77 ▲20.1952.81 ▼0.48
Media Library /wp-admin/upload.php1,419 ▲194.16 ▼0.03102.72 ▲2.9374.90 ▲30.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/notification-for-telegram/include/nftb_optionpage.php:1420

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

notification-for-telegram/index.php 92% from 13 tests

The principal PHP file in "Notification for Telegram" v. 3.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("notification-for-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 plugin2,349 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,1853062,001
CSS1526167
PO File16490154
JavaScript1272127

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity178.00
▷ Minimum class complexity178.00
▷ Maximum class complexity178.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions52
▷ Named functions4892.31%
▷ Anonymous functions47.69%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin