74% update-notifier-telegram

Code Review | Update Notifier Telegram

WordPress plugin Update Notifier Telegram scored74%from 54 tests.

About plugin

  • Plugin page: update-notifier-t...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Jun 22, 2022
  • Number of updates: 13
  • Update frequency: every 45.3 days
  • Top authors: alekshr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.22ms] Passed 4 tests

Server-side resources used by Update Notifier Telegram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0640.23 ▼2.21
Dashboard /wp-admin3.41 ▲0.0250.74 ▼18.87
Posts /wp-admin/edit.php3.52 ▲0.1249.89 ▲0.42
Add New Post /wp-admin/post-new.php5.99 ▲0.0693.13 ▼16.20
Media Library /wp-admin/upload.php3.33 ▲0.0640.46 ▲0.81
Update Notifier Telegram /wp-admin/options-general.php?page=update-notifier-telegram3.3034.47

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Update Notifier Telegram
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.35 ▲0.112.02 ▲0.1740.50 ▼3.26
Dashboard /wp-admin2,202 ▲255.57 ▲0.0588.64 ▼12.4040.28 ▼1.15
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0136.22 ▲0.3934.78 ▲1.01
Add New Post /wp-admin/post-new.php1,530 ▲222.92 ▼0.30657.99 ▼16.1557.27 ▼8.42
Media Library /wp-admin/upload.php1,404 ▲74.19 ▲0.08105.47 ▼10.1046.01 ▼5.59
Update Notifier Telegram /wp-admin/options-general.php?page=update-notifier-telegram8562.1726.3735.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function unregister_setting was called with an argument that is deprecated since version 4.7.0! $sanitize_callback is deprecated. The callback from register_setting() is used instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/update-notifier-telegram/update-notifier-telegram.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Plugin settings.)
You can look at the official readme.txt

update-notifier-telegram/update-notifier-telegram.php 92% from 13 tests

Analyzing the main PHP file in "Update Notifier Telegram" version 1.1.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin349 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14131258
PO File1283491

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.17MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png169.14KB62.23KB▼ 63.21%