84% wp-telegram-sharing

Code Review | WP Telegram Sharing

WordPress plugin WP Telegram Sharing scored84%from 54 tests.

About plugin

  • Plugin page: wp-telegram-sharing
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Oct 23, 2021
  • Number of updates: 15
  • Update frequency: every 96.0 days
  • Top authors: davoodjafary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.31MB] [CPU: ▼16.62ms] Passed 4 tests

A check of server-side resources used by WP Telegram Sharing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.44 ▼2.20
Dashboard /wp-admin3.32 ▲0.0247.36 ▼3.53
Posts /wp-admin/edit.php3.37 ▲0.0250.65 ▲2.15
Add New Post /wp-admin/post-new.php4.61 ▼1.2743.29 ▼59.07
Media Library /wp-admin/upload.php3.24 ▲0.0233.39 ▼1.68
WP Telegram Sharing /wp-admin/options-general.php?page=wp-telegram-sharing3.2130.65

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Telegram Sharing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.29 ▼1.461.57 ▼0.0937.86 ▼3.02
Dashboard /wp-admin2,207 ▲195.78 ▼0.10104.11 ▲2.0139.13 ▼2.18
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0239.18 ▲1.6835.70 ▲2.46
Add New Post /wp-admin/post-new.php1,545 ▲2218.34 ▼4.78638.92 ▼36.3956.11 ▼7.06
Media Library /wp-admin/upload.php1,386 ▼54.20 ▼0.0395.12 ▼5.9741.13 ▼1.46
WP Telegram Sharing /wp-admin/options-general.php?page=wp-telegram-sharing8562.0323.5227.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-telegram-sharing
    • > Notice in wp-content/plugins/wp-telegram-sharing/includes/option.php+22
    Undefined index: telegram_icon_position

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

wp-telegram-sharing/index.php 92% from 13 tests

"WP Telegram Sharing" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-telegram-sharing.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin161 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34622133
SVG10017
JavaScript1306
CSS1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin