72% sd-sms-master

Code Review | SD SMS Master

WordPress plugin SD SMS Master scored 72% from 54 tests.

About plugin

  • Plugin page: sd-sms-master
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.5.1
  • WordPress version: 5.8.1
  • First release: Mar 14, 2013
  • Latest release: Mar 18, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: Sverigedemokraterna IT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▼139.92ms] Passed 4 tests

An overview of server-side resources used by SD SMS Master
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.26 ▲0.4336.36 ▲8.54
Dashboard /wp-admin3.57 ▲0.5153.96 ▲3.97
Posts /wp-admin/edit.php3.62 ▲0.5147.22 ▲5.25
Add New Post /wp-admin/post-new.php5.87 ▲0.4496.42 ▼565.19
Media Library /wp-admin/upload.php3.45 ▲0.4435.13 ▼3.71
Statistics /wp-admin/admin.php?page=sd_sms_master_statistics3.4031.59
SD SMS Master /wp-admin/admin.php?page=sd_sms_master3.6729.19
Orders /wp-admin/admin.php?page=sd_sms_master_orders3.6931.74
Users /wp-admin/admin.php?page=sd_sms_master_users3.6928.95
Slaves /wp-admin/admin.php?page=sd_sms_master_slaves3.6930.70
Settings /wp-admin/admin.php?page=sd_sms_master_settings3.6728.15
Phones /wp-admin/admin.php?page=sd_sms_master_phones3.6928.95
Tools /wp-admin/admin.php?page=sd_sms_master_tools3.6730.29

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 2 new options
New WordPress options
recovery_mode_email_last_sent
SD_SMS_Master_server_url

Browser metrics Passed 4 tests

A check of browser resources used by SD SMS Master
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲17115.84 ▲0.246.33 ▼2.5449.25 ▲2.46
Dashboard /wp-admin3,031 ▲975.92 ▼0.22135.15 ▲1.81104.97 ▼4.75
Posts /wp-admin/edit.php2,803 ▲672.70 ▲0.0164.50 ▼0.3588.53 ▲1.85
Add New Post /wp-admin/post-new.php1,723 ▲5118.77 ▼0.13372.48 ▲2.09108.65 ▼1.36
Media Library /wp-admin/upload.php1,871 ▲645.02 ▲0.03153.34 ▲13.45127.68 ▲8.10
Statistics /wp-admin/admin.php?page=sd_sms_master_statistics9331.8533.1844.71
SD SMS Master /wp-admin/admin.php?page=sd_sms_master1,1162.0851.7159.80
Orders /wp-admin/admin.php?page=sd_sms_master_orders1,3972.0657.2582.18
Users /wp-admin/admin.php?page=sd_sms_master_users9381.8535.2257.78
Slaves /wp-admin/admin.php?page=sd_sms_master_slaves9381.8534.0652.53
Settings /wp-admin/admin.php?page=sd_sms_master_settings1,3172.2156.0882.96
Phones /wp-admin/admin.php?page=sd_sms_master_phones9381.8536.6551.47
Tools /wp-admin/admin.php?page=sd_sms_master_tools1,3172.0956.0081.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • recovery_mode_email_last_sent
    • SD_SMS_Master_server_url

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=sd_sms_master_statistics
    • > Error in wp-content/plugins/sd-sms-master/SD_SMS_Master.php+1700
    Uncaught Error: Class 'SMS_Master_Status_Request' not found in wp-content/plugins/sd-sms-master/SD_SMS_Master.php:1700
    Stack trace:
    #0 wp-includes/class-wp-hook.php(303): SD_SMS_Master->admin_statistics()
    #1 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sd_sms_master_tools
    • > Warning in wp-content/plugins/sd-sms-master/SD_Form.php+948
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
    • > GET request to /wp-admin/admin.php?page=sd_sms_master_users
    • > Error in wp-content/plugins/sd-sms-master/SD_SMS_Master.php+1921
    Uncaught Error: Class 'SMS_Master_List_Users_Request' not found in wp-content/plugins/sd-sms-master/SD_SMS_Master.php:1921
    Stack trace:
    #0 wp-content/plugins/sd-sms-master/SD_SMS_Master_Base.php(1675): SD_SMS_Master->admin_user_overview()
    #1 wp-content/plugins/sd-sms-master/SD_SMS_Master.php(1886): SD_SMS_Master_Base->tabs()
    #2 wp-includes/class-wp-hook.php(303): SD_SMS_Master->admin_users()
    #3 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(470): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=sd_sms_master_slaves
    • > Error in wp-content/plugins/sd-sms-master/SD_SMS_Master.php+1639
    Uncaught Error: Class 'SMS_Master_Status_Request' not found in wp-content/plugins/sd-sms-master/SD_SMS_Master.php:1639
    Stack trace:
    #0 wp-content/plugins/sd-sms-master/SD_SMS_Master_Base.php(1675): SD_SMS_Master->admin_slave_overview()
    #1 wp-content/plugins/sd-sms-master/SD_SMS_Master.php(1385): SD_SMS_Master_Base->tabs()
    #2 wp-includes/class-wp-hook.php(303): SD_SMS_Master->admin_slaves()
    #3 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(470): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=sd_sms_master_phones
    • > Error in wp-content/plugins/sd-sms-master/SD_SMS_Master.php+1130
    Uncaught Error: Class 'SMS_Master_Status_Request' not found in wp-content/plugins/sd-sms-master/SD_SMS_Master.php:1130
    Stack trace:
    #0 wp-content/plugins/sd-sms-master/SD_SMS_Master.php(1194): SD_SMS_Master->admin_new_phone()
    #1 wp-content/plugins/sd-sms-master/SD_SMS_Master_Base.php(1675): SD_SMS_Master->admin_phone_overview()
    #2 wp-content/plugins/sd-sms-master/SD_SMS_Master.php(918): SD_SMS_Master_Base->tabs()
    #3 wp-includes/class-wp-hook.php(303): SD_SMS_Master->admin_phones()
    #4 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(470): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sd-sms-master/SD_SMS_Master.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/sd-sms-master/SD_Form.php on line 910
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/sd-sms-master/SD_Form.php on line 948

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: sms, sms master, send sms

sd-sms-master/SD_SMS_Master.php 92% from 13 tests

The principal PHP file in "SD SMS Master" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("sd-sms-master.php" instead of "SD_SMS_Master.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,774 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36978693,774

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity113.25
▷ Minimum class complexity1.00
▷ Maximum class complexity158.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods123
▷ Static methods54.07%
▷ Public methods12097.56%
▷ Protected methods00.00%
▷ Private methods32.44%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin