10% nirweb-smart-sms

Code Review | افزونه پیامک ووکامرس و وردپرس نیر وب

WordPress plugin افزونه پیامک ووکامرس و وردپرس نیر وب scored10%from 54 tests.

About plugin

  • Plugin page: nirweb-smart-sms
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Jun 29, 2022
  • Number of updates: 11
  • Update frequency: every 3.3 days
  • Top authors: nirweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,684 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/nirweb-smart-sms/core/core.php+5
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.82ms] Passed 4 tests

A check of server-side resources used by افزونه پیامک ووکامرس و وردپرس نیر وب
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3239.43 ▲0.89
Dashboard /wp-admin3.62 ▲0.3245.57 ▼0.40
Posts /wp-admin/edit.php3.67 ▲0.3248.91 ▲2.94
Add New Post /wp-admin/post-new.php6.16 ▲0.2780.46 ▼8.45
Media Library /wp-admin/upload.php3.48 ▲0.2535.83 ▲0.70
Nirweb SMS General Settings /wp-admin/admin.php?page=nirweb_smart_sms_settings3.5096.55
Send SMSPRO /wp-admin/admin.php?page=send_sms_nirweb_smart_sms3.4535.04
SubscribersPRO /wp-admin/admin.php?page=export_billing_phone3.4529.23
Settings /wp-admin/admin.php?page=nirweb_ticket_settings3.4230.12

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 167 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
nirweb_smart_sms_perfix
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for افزونه پیامک ووکامرس و وردپرس نیر وب
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.78 ▼0.615.27 ▲3.3838.43 ▼9.18
Dashboard /wp-admin2,249 ▲615.13 ▼0.78110.74 ▲7.6038.54 ▼6.42
Posts /wp-admin/edit.php2,138 ▲492.28 ▲0.2838.16 ▲2.0333.71 ▼1.26
Add New Post /wp-admin/post-new.php1,564 ▲2818.17 ▼5.04622.00 ▼35.4151.92 ▲1.75
Media Library /wp-admin/upload.php1,434 ▲434.48 ▲0.3195.83 ▼6.3943.37 ▼2.06
Nirweb SMS General Settings /wp-admin/admin.php?page=nirweb_smart_sms_settings5,2584.0665.9650.82
Send SMSPRO /wp-admin/admin.php?page=send_sms_nirweb_smart_sms1,1261.8125.6655.28
SubscribersPRO /wp-admin/admin.php?page=export_billing_phone1,1141.8328.2434.12
Settings /wp-admin/admin.php?page=nirweb_ticket_settings8071.8324.7719.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • nirweb_smart_sms_perfix
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=nirweb_ticket_settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'nirweb_ticket_settings_func' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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/nirweb-smart-sms/option/codestar-framework.php
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/wp/birthday.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/nirweb-smart-sms/option/options/wp/contact_7.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/wp/learnpress.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/wp/comments.php:2
    • > PHP Warning
      Illegal string offset 'in_stock' in wp-content/plugins/nirweb-smart-sms/core/core.php on line 5
    • > PHP Warning
      Use of undefined constant nirweb_smart_sms_option - assumed 'nirweb_smart_sms_option' (this will throw an Error in a future version of PHP) in wp-content/plugins/nirweb-smart-sms/core/core.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/wp/post.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/woocommerce/stock-management.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/wp/wordpress_update.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CFSSMARTSMS' not found in wp-content/plugins/nirweb-smart-sms/option/options/woocommerce/failed.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: woocommerce sms, sms

nirweb-smart-sms/nirweb-smart-sms.php 92% from 13 tests

"افزونه پیامک ووکامرس و وردپرس نیر وب" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin32,452 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PO File223,6484,4967,447
PHP641,0715927,036
JavaScript121,2715246,623
Sass1697035,672
CSS124455515,662
SVG31012

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.61
Average class complexity31.83
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity7.08
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes00.00%
Methods104
▷ Static methods3836.54%
▷ Public methods10096.15%
▷ Protected methods21.92%
▷ Private methods21.92%
Functions51
▷ Named functions2650.98%
▷ Anonymous functions2549.02%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
option/assets/images/checkerboard.png2.29KB2.54KB0.00%