78% send-form-entries-to-telegram

Code Review | Send Form Entries To Telegram

WordPress plugin Send Form Entries To Telegram scored 78% from 54 tests.

About plugin

  • Plugin page: send-form-entries...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 5.9.2
  • First release: May 22, 2020
  • Latest release: Sep 3, 2020
  • Number of updates: 13
  • Update frequency: every 19.1 days
  • Top authors: salarsadeghi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 471 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Send Form Entries To Telegram
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1453.23 ▲7.32
Dashboard /wp-admin3.49 ▲0.0834.21 ▼4.09
Posts /wp-admin/edit.php3.71 ▲0.0737.57 ▼0.41
Add New Post /wp-admin/post-new.php6.95 ▼0.0290.74 ▼1,156.80
Media Library /wp-admin/upload.php3.36 ▲0.0724.85 ▼1.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 1,475 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Send Form Entries To Telegram
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲1915.66 ▼0.305.85 ▲0.062.25 ▼0.27
Dashboard /wp-admin2,905 ▲446.13 ▼0.03118.98 ▼17.36156.51 ▼8.99
Posts /wp-admin/edit.php2,702 ▲143.24 ▲0.0162.60 ▼6.14140.80 ▼6.67
Add New Post /wp-admin/post-new.php1,780 ▲7021.13 ▼0.27460.74 ▼4.19157.51 ▲6.19
Media Library /wp-admin/upload.php1,708 ▲105.53 ▼0.01144.63 ▲9.94189.55 ▲5.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/send-form-entries-to-telegram/include/vendor/symfony/translation/Resources/bin/translation-status.php
  • 254× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Update.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/ChatPermissions.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\Passport\\PassportElementError' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Passport/PassportElementErrorDataField.php:16
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\Cast' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Passport/EncryptedPassportElement.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Exceptions\\TelegramSDKException' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Exceptions/CouldNotUploadInputFile.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Passport/IdDocumentData.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/VideoNote.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Venue.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Telegram\\Bot\\Objects\\BaseObject' not found in wp-content/plugins/send-form-entries-to-telegram/include/vendor/irazasyed/telegram-bot-sdk/src/Objects/Contact.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: gravityforms, telegram

send-form-entries-to-telegram/gravityforms-telegram.php 85% from 13 tests

The main PHP file in "Send Form Entries To Telegram" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("send-form-entries-to-telegram.php" instead of "gravityforms-telegram.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/send-form-entries-to-telegram/include/vendor/bin/carbon.bat
      • wp-content/plugins/send-form-entries-to-telegram/include/vendor/nesbot/carbon/bin/carbon.bat
52,706 lines of code in 1,253 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,2027,80231,51345,657
JSON18003,140
XSD392482,803
Markdown193300780
PO File1333797
reStructuredText1747874
YAML312172
XML10045
CSS10020
Bourne Shell13110
DOS Batch2008
JavaScript1010

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.03
▷ Minimum class complexity1.00
▷ Maximum class complexity295.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces58
Interfaces44
Traits46
Classes287
▷ Abstract classes113.83%
▷ Concrete classes27696.17%
▷ Final classes279.78%
Methods2,101
▷ Static methods42420.18%
▷ Public methods1,81186.20%
▷ Protected methods1758.33%
▷ Private methods1155.47%
Functions303
▷ Named functions6320.79%
▷ Anonymous functions24079.21%
Constants203
▷ Global constants4622.66%
▷ Class constants15777.34%
▷ Public constants15699.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected