10% branded-sms-pakistan

Code Review | Branded SMS Pakistan

WordPress plugin Branded SMS Pakistan scored10%from 54 tests.

About plugin

  • Plugin page: branded-sms-pakistan
  • Plugin version: 3.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.7-6.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Apr 18, 2023
  • Number of updates: 59
  • Update frequency: every 21.6 days
  • Top authors: h3technologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,896 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/branded-sms-pakistan/index.php+631
    Undefined offset: 0

Server metrics [RAM: ▲0.58MB] [CPU: ▼2.14ms] Passed 4 tests

Analyzing server-side resources used by Branded SMS Pakistan
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6144.52 ▲6.38
Dashboard /wp-admin3.93 ▲0.5849.67 ▼8.32
Posts /wp-admin/edit.php3.98 ▲0.6246.52 ▲0.15
Add New Post /wp-admin/post-new.php6.47 ▲0.5890.61 ▼6.77
Media Library /wp-admin/upload.php3.79 ▲0.5643.55 ▲10.39
Bulk Marketing /wp-admin/admin.php?page=branded-sms-pakistan-marketing3.7533.50
Settings /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel3.7740.89
Contact Us /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel-contact3.7635.05
Activate /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel-optin3.7934.89

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 4 new tables, 7 new options
New tables
wp_bsp_settings
wp_bsp_users
wp_bsp_cm
wp_bsp_otp
New WordPress options
can_compress_scripts
widget_recent-posts
recovery_mode_email_last_sent
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Branded SMS Pakistan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.20 ▼0.051.74 ▲0.1448.25 ▼0.83
Dashboard /wp-admin2,254 ▲745.61 ▼0.0680.67 ▼10.6881.46 ▲42.31
Posts /wp-admin/edit.php2,157 ▲572.01 ▼0.0238.32 ▲3.6233.51 ▼4.08
Add New Post /wp-admin/post-new.php1,728 ▲20022.23 ▼1.02699.64 ▲16.1055.01 ▼11.45
Media Library /wp-admin/upload.php1,453 ▲534.24 ▲0.0397.96 ▼11.0877.28 ▲28.85
Bulk Marketing /wp-admin/admin.php?page=branded-sms-pakistan-marketing7491.6912.7343.21
Settings /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel9011.7025.1939.94
Contact Us /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel-contact1,1732.0125.7954.05
Activate /wp-admin/admin.php?page=branded-sms-pakistan-adminpanel-optin9011.6324.0133.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=branded-sms-pakistan-marketing
    • > Error in wp-content/plugins/branded-sms-pakistan/index.php+137
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/branded-sms-pakistan/index.php:137
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): bsp_marketingPage()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/branded-sms-pakistan/index.php:154

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=branded-sms-pakistan-marketing
    • > Network (severe)
    wp-content/plugins/branded-sms-pakistan/images/form-wizard-bg.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Screenshot #4 (Bulk Marketing Feature to send messages to customer who have done purchasing with your store. Easily target to customer by product name or category.) image required
You can look at the official readme.txt

branded-sms-pakistan/index.php 85% from 13 tests

The primary PHP file in "Branded SMS Pakistan" version 3.0.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("branded-sms-pakistan.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 366 characters long)

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
There were no executable files found in this plugin4,982 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,0042543,984
JavaScript813759501
CSS75610497

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity28.00
▷ Minimum class complexity4.00
▷ Maximum class complexity65.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods113
▷ Static methods65.31%
▷ Public methods11299.12%
▷ Protected methods00.00%
▷ Private methods10.88%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bsp_icon.png3.42KB0.84KB▼ 75.36%
img/icon-256x256.png51.41KB23.06KB▼ 55.15%