83% order-notification-for-telegram

Code Review | Order Notification for Telegram

WordPress plugin Order Notification for Telegram scored83%from 54 tests.

About plugin

  • Plugin page: order-notificatio...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.5
  • WordPress version: 6.3.1
  • First release: Jan 21, 2021
  • Latest release: Jan 21, 2021
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: choplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /4,157 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.05MB] [CPU: ▼2.30ms] Passed 4 tests

This is a short check of server-side resources used by Order Notification for Telegram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.91 ▼7.71
Dashboard /wp-admin3.35 ▲0.0457.17 ▲4.83
Posts /wp-admin/edit.php3.46 ▲0.1053.00 ▲2.91
Add New Post /wp-admin/post-new.php5.95 ▲0.0698.86 ▲0.27
Media Library /wp-admin/upload.php3.27 ▲0.0437.52 ▼4.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Order Notification for Telegram
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.73 ▲0.351.70 ▼0.7743.86 ▼3.82
Dashboard /wp-admin2,202 ▲255.62 ▼0.0588.54 ▲0.4140.88 ▲2.93
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0635.39 ▲1.1036.09 ▼0.85
Add New Post /wp-admin/post-new.php1,530 ▲223.70 ▲0.35696.54 ▲24.6160.05 ▲7.38
Media Library /wp-admin/upload.php1,398 ▲14.22 ▲0.04101.48 ▼16.5746.04 ▼1.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/order-notification-for-telegram/Classes/SettingPage.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/order-notification-for-telegram/inc/admin_ajax.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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: The official readme.txt is a good inspiration

order-notification-for-telegram/index.php 77% from 13 tests

The main file in "Order Notification for Telegram" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "3.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("order-notification-for-telegram.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected716 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP74249369
SVG101185
PO File1222284
JavaScript10037
Markdown113029
Sass10011
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2492.31%
▷ Protected methods00.00%
▷ Private methods27.69%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png33.38KB18.37KB▼ 44.99%
screenshot-1.png49.94KB20.30KB▼ 59.36%