73% persian-woocommerce-sms

Code Review | افزونه پیامک ووکامرس Persian WooCommerce SMS

WordPress plugin افزونه پیامک ووکامرس Persian WooCommerce SMS scored 73% from 54 tests.

About plugin

  • Plugin page: persian-woocommer...
  • Plugin version: 6.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2014
  • Latest release: Jul 31, 2023
  • Number of updates: 156
  • Update frequency: every 22.2 days
  • Top authors: Persianscript (59.62%)hannanstd (41.03%)

Code review

54 tests

User reviews

82 reviews

Install metrics

30,000+ active / 329,220 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.53MB] [CPU: ▼0.96ms] Passed 4 tests

This is a short check of server-side resources used by افزونه پیامک ووکامرس Persian WooCommerce SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.5949.84 ▲10.13
Dashboard /wp-admin4.93 ▲1.6345.32 ▼8.70
Posts /wp-admin/edit.php5.07 ▲1.7147.63 ▼0.00
Add New Post /wp-admin/post-new.php7.13 ▲1.2584.65 ▼0.56
Media Library /wp-admin/upload.php4.88 ▲1.6542.60 ▲5.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 54 new files
Database: 2 new tables, 24 new options
New tables
wp_woocommerce_ir_sms_contacts
wp_woocommerce_ir_sms_archive
New WordPress options
sms_contacts
pwoosms_hide_about_page
theysaidso_admin_options
pwoosms_update_gateway_options
widget_theysaidso_widget
pwoosms_table_archive
pwoosms_table_contacts_created
sms_product_admin_settings
widget_recent-comments
sms_main_settings
...

Browser metrics Passed 4 tests

افزونه پیامک ووکامرس Persian WooCommerce SMS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,487 ▼1,24812.92 ▼1.481.89 ▲0.2138.24 ▼2.84
Dashboard /wp-admin855 ▼1,3331.73 ▼4.1319.03 ▼83.0119.67 ▼14.45
Posts /wp-admin/edit.php866 ▼1,2231.52 ▼0.529.77 ▼24.4521.54 ▼14.66
Add New Post /wp-admin/post-new.php582 ▼9511.70 ▼19.2510.23 ▼675.757.02 ▼55.99
Media Library /wp-admin/upload.php741 ▼6411.70 ▼2.549.66 ▼98.4119.68 ▼30.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_woocommerce_ir_sms_archive
    • wp_woocommerce_ir_sms_contacts
  • This plugin does not fully uninstall, leaving 21 options in the database
    • sms_archive
    • sms_send
    • recovery_mode_email_last_sent
    • sms_main_settings
    • widget_recent-comments
    • sms_about
    • pwoosms_table_contacts_created
    • theysaidso_admin_options
    • pwoosms_table_contacts_updated
    • sms_notif_settings
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/persian-woocommerce-sms/includes/class-functions.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: woocommerce, persian woocommerce, sms

persian-woocommerce-sms/WoocommerceIR_SMS.php 77% from 13 tests

The main PHP script in "افزونه پیامک ووکامرس Persian WooCommerce SMS" version 6.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 389 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("5.8" instead of "5.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("persian-woocommerce-sms.php" instead of "WoocommerceIR_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
Good job! No executable or dangerous file extensions detected19,627 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP223,2655,16719,317
CSS2574236
JavaScript22574

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity68.33
▷ Minimum class complexity1.00
▷ Maximum class complexity476.00
Average method complexity7.19
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes56
▷ Abstract classes00.00%
▷ Concrete classes56100.00%
▷ Final classes00.00%
Methods623
▷ Static methods294.65%
▷ Public methods60997.75%
▷ Protected methods00.00%
▷ Private methods142.25%
Functions32
▷ Named functions1237.50%
▷ Anonymous functions2062.50%
Constants3
▷ Global constants3100.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
12 PNG files occupy 0.38MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons8-instagram-500(1).png13.58KB9.20KB▼ 32.25%
assets/images/tick.png0.66KB0.60KB▼ 8.70%
assets/images/2.png51.40KB21.00KB▼ 59.14%
assets/images/instagram-48.png2.62KB1.95KB▼ 25.42%
assets/images/persian-woocommerce-sms-logo.png4.92KB2.86KB▼ 41.90%