10% broadcast-to-telegram

Code Review | Broadcast to Telegram

WordPress plugin Broadcast to Telegram scored10%from 54 tests.

About plugin

  • Plugin page: broadcast-to-tele...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2017
  • Latest release: Feb 4, 2017
  • Number of updates: 25
  • Update frequency: every 0.1 days
  • Top authors: EnzoCostantini55 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,425 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/broadcast-to-telegram/notifcaster.class.php+328
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼2.12MB] [CPU: ▼59.64ms] Passed 4 tests

Analyzing server-side resources used by Broadcast to Telegram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.595.86 ▼43.54
Dashboard /wp-admin2.16 ▼1.406.75 ▼49.93
Posts /wp-admin/edit.php2.16 ▼1.526.77 ▼47.39
Add New Post /wp-admin/post-new.php2.16 ▼3.987.41 ▼97.68
Media Library /wp-admin/upload.php2.16 ▼1.338.59 ▼30.28
Broadcast to Telegram /wp-admin/options-general.php?page=brtg_options_page2.166.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Broadcast to Telegram
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.27 ▼0.531.84 ▼0.1239.14 ▼3.94
Dashboard /wp-admin2,196 ▲195.64 ▼0.0787.35 ▼2.8139.60 ▼8.23
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0236.69 ▼1.1933.71 ▼3.13
Add New Post /wp-admin/post-new.php1,529 ▼2117.72 ▼5.67659.05 ▼35.7957.55 ▲1.62
Media Library /wp-admin/upload.php1,398 ▲14.27 ▲0.0599.05 ▼15.9143.02 ▼5.73
Broadcast to Telegram /wp-admin/options-general.php?page=brtg_options_page9732.0524.2449.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/broadcast-to-telegram/notifcaster.class.php+328
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=brtg_options_page
    • > Warning in wp-content/plugins/broadcast-to-telegram/notifcaster.class.php+328
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
    • > GET request to /wp-admin/options-general.php?page=brtg_options_page
    • > Notice in wp-content/plugins/broadcast-to-telegram/admin-page.php+92
    Undefined variable: chd

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× PHP files output text when accessed directly:
    • > /wp-content/plugins/broadcast-to-telegram/broadcast-to-telegram.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/broadcast-to-telegram/notifcaster.class.php on line 328
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/broadcast-to-telegram/notifcaster.class.php on line 328

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

broadcast-to-telegram/broadcast-to-telegram.php Passed 13 tests

The main PHP script in "Broadcast to Telegram" version 1.2.0 is automatically included on every request by WordPress
135 characters long description:
Post notification system on one or more channels via Telegram Bot. The plugin allows to select the document type and Telegram channels.

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 plugin707 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP379116622
PO File1323485

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/telegram-icon.png2.86KB2.06KB▼ 27.91%