78% contact-for-telegram

Code Review | Contact for Telegram

WordPress plugin Contact for Telegram scored78%from 54 tests.

About plugin

  • Plugin page: contact-for-telegram
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 30, 2021
  • Latest release: Feb 3, 2021
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: awhurtado87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼4.92ms] Passed 4 tests

Analyzing server-side resources used by Contact for Telegram
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.72 ▲2.77
Dashboard /wp-admin3.24 ▼0.0732.36 ▼15.61
Posts /wp-admin/edit.php3.30 ▼0.0641.28 ▼0.40
Add New Post /wp-admin/post-new.php5.48 ▼0.4184.77 ▼6.43
Media Library /wp-admin/upload.php3.24 ▲0.0138.20 ▲5.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact for Telegram
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.37 ▼0.591.64 ▲0.1145.05 ▲5.78
Dashboard /wp-admin2,227 ▲415.03 ▼0.90143.39 ▲21.2786.77 ▲40.03
Posts /wp-admin/edit.php2,130 ▲412.28 ▲0.2743.79 ▲3.0238.81 ▲8.14
Add New Post /wp-admin/post-new.php1,702 ▲16022.77 ▲4.55763.70 ▲130.1947.33 ▼4.29
Media Library /wp-admin/upload.php1,424 ▲394.34 ▲0.12121.91 ▲19.5949.12 ▲3.88

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/contact-for-telegram/contact-for-telegram.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/contact-for-telegram/Front/views/telegram.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/contact-for-telegram/Admin/views/config.php:4

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("www.paypal.me/tupaginawebdesdecero")
Please take inspiration from this readme.txt

contact-for-telegram/contact-for-telegram.php Passed 13 tests

The main file in "Contact for Telegram" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
Boton sencillo personalizable para enlace directo a usuario o canal de telegram.

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
Good job! No executable or dangerous file extensions detected388 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP89695331
JavaScript225445
CSS21012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Front/img/telegram_3.png1.49KB1.40KB▼ 6.08%
Front/img/telegram_2.png2.29KB2.22KB▼ 2.99%
Front/img/telegram_icon.png0.83KB0.78KB▼ 6.34%
Front/img/telegram_4.png1.50KB1.42KB▼ 5.41%
Admin/img/telegram_icon_menu.png0.45KB0.43KB▼ 5.21%