68% ng-mail2telegram

Code Review | NG-Mail2Telegram

WordPress plugin NG-Mail2Telegram scored68%from 54 tests.

About plugin

  • Plugin page: ng-mail2telegram
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3.2
  • WordPress version: 6.3.1
  • First release: May 19, 2019
  • Latest release: Feb 28, 2020
  • Number of updates: 16
  • Update frequency: every 17.8 days
  • Top authors: nikitaglobal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /674 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.14MB] [CPU: ▼38.67ms] Passed 4 tests

A check of server-side resources used by NG-Mail2Telegram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6415.10 ▼21.50
Dashboard /wp-admin2.87 ▼0.4319.50 ▼27.20
Posts /wp-admin/edit.php2.87 ▼0.4816.11 ▼29.72
Add New Post /wp-admin/post-new.php2.87 ▼3.0120.34 ▼76.25
Media Library /wp-admin/upload.php2.87 ▼0.3616.45 ▼16.10
NG WP Mail to telegram /wp-admin/options-general.php?page=NG-Mail2Telegram2.8715.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for NG-Mail2Telegram
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.28 ▼0.981.90 ▲0.1643.36 ▲2.37
Dashboard /wp-admin2,213 ▲255.88 ▲0.06100.56 ▼15.0838.49 ▼3.72
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0136.34 ▼1.6233.90 ▲4.32
Add New Post /wp-admin/post-new.php1,545 ▲2418.49 ▼4.86613.13 ▼64.4350.67 ▲2.58
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.0499.66 ▲2.0642.33 ▼4.22
NG WP Mail to telegram /wp-admin/options-general.php?page=NG-Mail2Telegram8172.0327.3731.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ng-mail2telegram/ng-mail2telegram.php+175
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=NG-Mail2Telegram
    • > Notice in wp-content/plugins/ng-mail2telegram/ng-mail2telegram.php+175
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ng-mail2telegram/ng-mail2telegram.php

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: messengers, telegram, notifications, mail, wpmail...

ng-mail2telegram/ng-mail2telegram.php 77% from 13 tests

"NG-Mail2Telegram" version 1.4'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 should only use lowercase characters and dashes
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

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
There were no executable files found in this plugin602 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP166317601
HTML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2261.11%
▷ Protected methods00.00%
▷ Private methods1438.89%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
There are no PNG files in this plugin