78% tgchannel

Code Review | Channel Widget for telegram

WordPress plugin Channel Widget for telegram scored78%from 54 tests.

About plugin

  • Plugin page: tgchannel
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2017
  • Latest release: May 21, 2019
  • Number of updates: 12
  • Update frequency: every 42.5 days
  • Top authors: sjhoo (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /8,988 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.57ms] Passed 4 tests

An overview of server-side resources used by Channel Widget for telegram
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.30 ▼3.63
Dashboard /wp-admin3.34 ▲0.0452.43 ▼1.57
Posts /wp-admin/edit.php3.39 ▲0.0349.39 ▲0.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.20 ▼5.93
Media Library /wp-admin/upload.php3.26 ▲0.0338.52 ▲2.30
Settings TGchannel /wp-admin/options-general.php?page=TGchannel-settings3.3546.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 20 new options
New WordPress options
TG_Channel_Header_Font_color
TG_Channel_Header_color
TG_Channel_Body_height
TG_Channel_Footer_Font_size
widget_recent-posts
TG_Channel_Body_width
TG_Channel_background
can_compress_scripts
widget_theysaidso_widget
TG_Channel_body_size
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Channel Widget for telegram
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.49 ▼0.808.10 ▲6.3843.47 ▼4.40
Dashboard /wp-admin2,199 ▲225.64 ▲0.0190.63 ▼8.5740.39 ▼3.87
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0039.61 ▲2.6436.37 ▲0.43
Add New Post /wp-admin/post-new.php1,529 ▲123.05 ▼0.17664.85 ▼25.2852.43 ▼0.30
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0199.14 ▼5.4446.50 ▲1.61
Settings TGchannel /wp-admin/options-general.php?page=TGchannel-settings1,8044.2189.5839.32

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 20 options in the database
    • TG_Channel_background
    • TG_Channel_Footer_Font_size
    • TG_Channel_Header_Height
    • TG_Channel_Header_Font_size
    • widget_tgchannel_widget
    • TG_Channel_Body_width
    • can_compress_scripts
    • theysaidso_admin_options
    • TG_Channel_background_color
    • TG_Channel_Footer_Height
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=TGchannel-settings
    • > Notice in wp-content/plugins/tgchannel/admin/settings.php+139
    Undefined variable: rowdisp

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tgchannel/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tgchannel/css/style.css.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tgchannel/tgchannel.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tgchannel/helper.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: telegram, telegram widget, channel widget, telegram channel in wordpress, embed channel...

tgchannel/tgchannel.php 92% from 13 tests

"Channel Widget for telegram" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,088 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP523464703
CSS24314207
JavaScript34722107
PO File1191971

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 1.07MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screen-3.png58.06KB24.33KB▼ 58.09%
css/sear.png1.09KB0.82KB▼ 24.42%
assets/screen-2.png294.74KB91.95KB▼ 68.80%
assets/screen-4.png61.34KB23.96KB▼ 60.94%
assets/screen-1.png682.69KB150.09KB▼ 78.01%