88% sms-club-messages

Code Review | SMS CLUB Messages

WordPress plugin SMS CLUB Messages scored 88% from 54 tests.

About plugin

  • Plugin page: sms-club-messages
  • Plugin version: 4.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Jul 31, 2021
  • Latest release: Oct 3, 2021
  • Number of updates: 9
  • Update frequency: every 7.2 days
  • Top authors: smsclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 121 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼144.17ms] Passed 4 tests

This is a short check of server-side resources used by SMS CLUB Messages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1939.59 ▲15.65
Dashboard /wp-admin3.14 ▲0.0850.02 ▲1.08
Posts /wp-admin/edit.php3.23 ▲0.1247.05 ▼0.48
Add New Post /wp-admin/post-new.php5.50 ▲0.0688.11 ▼574.02
Media Library /wp-admin/upload.php3.09 ▲0.0831.55 ▼3.26
Настройки /wp-admin/admin.php?page=message_settings3.0731.95
Отправка Viber /wp-admin/admin.php?page=viber_message_slug3.0734.42
Статистика /wp-admin/admin.php?page=statistic3.0629.54
Отправка СМС /wp-admin/admin.php?page=message_plugin3.0729.37

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: 2 new tables, no new options
New tables
wp_smsclub_settings
wp_smsclub_statistic

Browser metrics Passed 4 tests

An overview of browser requirements for SMS CLUB Messages
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,729 ▲15715.94 ▲0.0511.57 ▲2.1052.85 ▲4.61
Dashboard /wp-admin3,023 ▲926.14 ▲0.19151.87 ▲1.00125.25 ▲6.86
Posts /wp-admin/edit.php2,789 ▲502.72 ▲0.0266.97 ▼3.7994.16 ▼3.58
Add New Post /wp-admin/post-new.php1,532 ▼2,04318.89 ▲4.21403.79 ▼50.49120.78 ▲3.79
Media Library /wp-admin/upload.php1,857 ▲1095.07 ▲0.07161.69 ▲7.09125.03 ▼6.74
Настройки /wp-admin/admin.php?page=message_settings1,1262.1164.1675.49
Отправка Viber /wp-admin/admin.php?page=viber_message_slug1,0552.1058.5562.39
Статистика /wp-admin/admin.php?page=statistic1,0552.1160.5954.93
Отправка СМС /wp-admin/admin.php?page=message_plugin1,0522.0962.4960.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sms-club-messages/templates/header_template.php
    • > /wp-content/plugins/sms-club-messages/templates/spinner.php
    • > /wp-content/plugins/sms-club-messages/templates/popup_message_inform_template.php
    • > /wp-content/plugins/sms-club-messages/templates/statistic_page_template.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'SmsclubApi\\Interfaces\\SendResponseInterface' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Classes/SendResponse.php:11
    • > PHP Notice
      Undefined variable: balance in wp-content/plugins/sms-club-messages/templates/header_template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'SmsclubApi\\Interfaces\\SmsStatusInterface' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Classes/SmsStatus.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'SmsclubApi\\Http\\Client' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Http/SmsClient.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'SmsclubApi\\Interfaces\\OriginatorInterface' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Classes/Originator.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'SmsclubApi\\Interfaces\\ViberStatusInterface' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Classes/ViberStatus.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sms-club-messages/templates/form_sms_viber_template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_account_data() in wp-content/plugins/sms-club-messages/templates/settings_page_template.php:2
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/sms-club-messages/templates/header_template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Interface 'SmsclubApi\\Interfaces\\MessangerInterface' not found in wp-content/plugins/sms-club-messages/php-new-master/src/Interfaces/ViberMessageInterface.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: sms, viber, sms club, message, smsclub...

sms-club-messages/plugin-sms.php 92% from 13 tests

This is the main PHP file of "SMS CLUB Messages" version 4.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sms-club-messages.php" instead of "plugin-sms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,026 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP353447171,333
CSS12915325
Markdown1550214
JavaScript2298154

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.17
Average class complexity2.54
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces6
Interfaces11
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods133
▷ Static methods86.02%
▷ Public methods11485.71%
▷ Protected methods129.02%
▷ Private methods75.26%
Functions23
▷ Named functions2191.30%
▷ Anonymous functions28.70%
Constants29
▷ Global constants413.79%
▷ Class constants2586.21%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png100.35KB34.75KB▼ 65.37%
assets/icon-128x128.png4.16KB1.72KB▼ 58.56%