78% smartarget-telegram-contact-us

Code Review | Smartarget Telegram - Contact Us

WordPress plugin Smartarget Telegram - Contact Us scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-telegr...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 23, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 30
  • Update frequency: every 23.9 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.68ms] Passed 4 tests

Server-side resources used by Smartarget Telegram - Contact Us
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.11 ▲1.04
Dashboard /wp-admin3.37 ▲0.0749.43 ▼0.31
Posts /wp-admin/edit.php3.48 ▲0.1351.30 ▲3.60
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.67 ▼7.06
Media Library /wp-admin/upload.php3.29 ▲0.0641.19 ▲5.91
Smartarget Telegram - Contact Us /wp-admin/options-general.php?page=smartarget_telegram3.2632.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 22 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

Smartarget Telegram - Contact Us: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13521.33 ▲6.9710.52 ▲8.2943.42 ▼0.96
Dashboard /wp-admin2,205 ▲2810.62 ▲5.09176.88 ▲81.0039.51 ▼1.47
Posts /wp-admin/edit.php2,119 ▲197.25 ▲5.23123.24 ▲87.1635.72 ▼2.09
Add New Post /wp-admin/post-new.php1,694 ▲16827.32 ▲3.52709.75 ▲23.8962.59 ▼5.72
Media Library /wp-admin/upload.php1,407 ▲79.69 ▲5.51190.22 ▲93.3147.57 ▲5.31
Smartarget Telegram - Contact Us /wp-admin/options-general.php?page=smartarget_telegram2,38311.92229.63133.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smartarget-telegram-contact-us/public/partials/smartarget-telegram-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-telegram-contact-us/admin/partials/smartarget-telegram-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
7 plugin tags: telegram, telegram bot, telegram group, telegram channel, telegram messages...

smartarget-telegram-contact-us/smartarget-telegram.php 85% from 13 tests

The main file in "Smartarget Telegram - Contact Us" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("smartarget-telegram-contact-us.php" instead of "smartarget-telegram.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin430 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130522225
JavaScript351,397205
CSS1040

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin