79% broadnet-sms-services

Code Review | Broadnet SMS Services

WordPress plugin Broadnet SMS Services scored 79% from 54 tests.

About plugin

  • Plugin page: broadnet-sms-serv...
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2023
  • Latest release: Apr 13, 2023
  • Number of updates: 8
  • Update frequency: every 2.0 days
  • Top authors: rabihz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 136 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.17MB] [CPU: ▼4.19ms] Passed 4 tests

Server-side resources used by Broadnet SMS Services
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.08 ▲1.32
Dashboard /wp-admin3.47 ▲0.1744.35 ▼4.45
Posts /wp-admin/edit.php3.58 ▲0.2346.84 ▼3.10
Add New Post /wp-admin/post-new.php6.07 ▲0.1889.27 ▼10.53
Media Library /wp-admin/upload.php3.39 ▲0.1639.96 ▲2.93

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 14 new options
New WordPress options
pending_order_sms_template
cancelled_order_sms_template
text_message_admin_template
on_hold_order_sms_template
default_sms_template
widget_recent-comments
processing_order_sms_template
can_compress_scripts
refunded_order_sms_template
completed_order_sms_template
...

Browser metrics Passed 4 tests

A check of browser resources used by Broadnet SMS Services
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18913.63 ▼0.955.32 ▲3.2341.40 ▼7.94
Dashboard /wp-admin2,219 ▲434.89 ▲0.02105.73 ▼8.3337.40 ▼11.12
Posts /wp-admin/edit.php2,108 ▲162.03 ▲0.0235.22 ▼1.9330.59 ▼3.18
Add New Post /wp-admin/post-new.php1,542 ▲923.24 ▲0.01599.07 ▼43.0958.63 ▲4.36
Media Library /wp-admin/upload.php1,401 ▲134.17 ▼0.0497.99 ▼10.2243.67 ▼0.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/broadnet-sms-services/trunk/public/partials/woocoomerce-sms-services-public-display.php
    • > /wp-content/plugins/broadnet-sms-services/public/partials/woocoomerce-sms-services-public-display.php
    • > /wp-content/plugins/broadnet-sms-services/trunk/admin/partials/woocoomerce-sms-services-admin-display.php
    • > /wp-content/plugins/broadnet-sms-services/admin/partials/woocoomerce-sms-services-admin-display.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/broadnet-sms-services/trunk/admin/views/partials-html-how-to-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/broadnet-sms-services/trunk/admin/views/partials-html-sms-settings-form-view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/broadnet-sms-services/admin/views/partials-html-sms-settings-form-view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/broadnet-sms-services/admin/views/partials-html-how-to-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/broadnet-sms-services/admin/views/partials-html-sms-general-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/broadnet-sms-services/trunk/admin/views/partials-html-sms-general-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
7 plugin tags: order on-hold sms notification, order cancelled sms notification, order processing sms notification, order refunded sms notification, send direct message to customer...

broadnet-sms-services/broadnet-sms-services.php Passed 13 tests

The primary PHP file in "Broadnet SMS Services" version 0.0.1 is used by WordPress to initiate all plugin functionality
119 characters long description:
This plugin is to send SMS notification to customers and administrator when orders status is changed using WooCommerce.

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
No dangerous file extensions were detected902 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16291597793
CSS214587
JavaScript2112822

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods80
▷ Static methods810.00%
▷ Public methods6682.50%
▷ Protected methods00.00%
▷ Private methods1417.50%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin