10% teletter-telegram-newsletter

Code Review | Teletter Telegram Newsletter

WordPress plugin Teletter Telegram Newsletter scored10%from 54 tests.

About plugin

  • Plugin page: teletter-telegram...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Aug 15, 2015
  • Latest release: Dec 30, 2015
  • Number of updates: 24
  • Update frequency: every 5.8 days
  • Top authors: websima (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /9,328 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/teletter-telegram-newsletter/telegram.php+73
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.77MB] [CPU: ▼62.07ms] Passed 4 tests

This is a short check of server-side resources used by Teletter Telegram Newsletter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.248.37 ▼33.84
Dashboard /wp-admin2.24 ▼1.108.73 ▼57.58
Posts /wp-admin/edit.php2.25 ▼1.118.27 ▼48.87
Add New Post /wp-admin/post-new.php2.24 ▼3.648.28 ▼107.97
Media Library /wp-admin/upload.php2.25 ▼0.988.16 ▼28.78
subscribers /wp-admin/edit.php?post_type=subscriber2.258.55
Log /wp-admin/admin.php?page=teletter_log2.257.96
Telegram API /wp-admin/admin.php?page=telegram_api2.258.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Teletter Telegram Newsletter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.72 ▲0.371.86 ▼0.0142.85 ▼2.77
Dashboard /wp-admin2,218 ▲475.56 ▼0.0485.35 ▼6.2769.32 ▲27.12
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0337.30 ▼3.8333.06 ▼3.98
Add New Post /wp-admin/post-new.php1,701 ▲17522.17 ▼0.63731.68 ▲52.4163.77 ▼1.77
Media Library /wp-admin/upload.php1,429 ▲324.23 ▲0.01100.97 ▼12.7670.71 ▲22.78
subscribers /wp-admin/edit.php?post_type=subscriber1,1331.9132.7829.19
Log /wp-admin/admin.php?page=teletter_log8122.0026.3131.59
Telegram API /wp-admin/admin.php?page=telegram_api1,0872.1224.0326.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/teletter-telegram-newsletter/telegram.php+73
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
These errors were triggered by the plugin
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=telegram_api
    • > Notice in wp-content/plugins/teletter-telegram-newsletter/includes/api-settings.php+236
    Trying to access array offset on value of type bool

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teletter-telegram-newsletter/includes/notification-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teletter-telegram-newsletter/includes/pagetemplate.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teletter-telegram-newsletter/telegram.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/teletter-telegram-newsletter/includes/api-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teletter-telegram-newsletter/includes/api-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teletter-telegram-newsletter/includes/users-save.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Telegram API Settings Page), #2 (Telegram API Meta Box on posts, pages or custom post types), #3 (List of Subscribers showing details. (User id, first name, last name, Telegram Username, Activation Status, Date of Subscription))
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === teletter-telegram-newsletter === )
You can look at the official readme.txt

teletter-telegram-newsletter/telegram.php 92% from 13 tests

The main PHP script in "Teletter Telegram Newsletter" version 1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("teletter-telegram-newsletter.php" instead of "telegram.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,338 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP91831451,128
PO File189179210

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/teletter.png13.71KB12.40KB▼ 9.50%
includes/dashicon.png0.58KB0.74KB0.00%
screenshot-3.png18.32KB17.36KB▼ 5.23%
screenshot-2.png3.75KB2.72KB▼ 27.50%
screenshot-1.png15.28KB14.31KB▼ 6.35%