67% payamito-sms-woocommerce

Code Review | افزونه پیامک ووکامرس فوق حرفه ای (جدید) payamito sms woocommerce

WordPress plugin افزونه پیامک ووکامرس فوق حرفه ای (جدید) payamito sms woocommerce scored67%from 54 tests.

About plugin

  • Plugin page: payamito-sms-wooc...
  • Plugin version: 1.2.8
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Apr 27, 2023
  • Number of updates: 46
  • Update frequency: every 8.3 days
  • Top authors: payamito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,974 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.46MB] [CPU: ▼1.25ms] Passed 4 tests

This is a short check of server-side resources used by افزونه پیامک ووکامرس فوق حرفه ای (جدید) payamito sms woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4543.79 ▲3.08
Dashboard /wp-admin3.77 ▲0.4352.06 ▼17.04
Posts /wp-admin/edit.php3.88 ▲0.5354.12 ▲0.11
Add New Post /wp-admin/post-new.php6.39 ▲0.5199.87 ▲10.94
Media Library /wp-admin/upload.php3.69 ▲0.4742.06 ▲8.87
پیامیتو /wp-admin/admin.php?page=payamito3.8050.11
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.72108.92
Logs /wp-admin/admin.php?page=payamito_logs3.6738.42

Server storage [IO: ▲5.77MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 313 new files
Database: 3 new tables, 8 new options
New tables
wp_payamito_wc_cart_abandonment
wp_payamito_wc_history
wp_payamito_sms
New WordPress options
payamito_core_version
db_upgraded
payamito
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for افزونه پیامک ووکامرس فوق حرفه ای (جدید) payamito sms woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,057 ▲29613.77 ▼0.376.98 ▲5.1436.84 ▼3.91
Dashboard /wp-admin2,375 ▲1725.98 ▲0.1999.82 ▲0.2147.30 ▲7.24
Posts /wp-admin/edit.php2,220 ▲1202.42 ▲0.4340.88 ▲0.6942.32 ▲4.10
Add New Post /wp-admin/post-new.php1,591 ▲6022.45 ▼0.72636.67 ▼22.3656.81 ▲7.67
Media Library /wp-admin/upload.php1,559 ▲1594.41 ▲0.19102.56 ▼5.2150.15 ▲3.43
پیامیتو /wp-admin/admin.php?page=payamito3,4574.74100.31124.08
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0112.0927.4836.36
Logs /wp-admin/admin.php?page=payamito_logs1,4812.3846.2842.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_payamito_wc_cart_abandonment
    • wp_payamito_wc_history
    • wp_payamito_sms
  • Zombie WordPress options were found after uninstall: 8 options
    • payamito_core_version
    • widget_recent-posts
    • payamito
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/payamito-sms-woocommerce/includes/core/payamito-core/admin/partials/payamito-admin-display.php
    • > /wp-content/plugins/payamito-sms-woocommerce/includes/payamito-woocommerce.php
    • > /wp-content/plugins/payamito-sms-woocommerce/includes/Autoloader.php
    • > /wp-content/plugins/payamito-sms-woocommerce/includes/core/payamito-core/public/partials/payamito-public-display.php
    • > /wp-content/plugins/payamito-sms-woocommerce/bootstrap.php
    • > /wp-content/plugins/payamito-sms-woocommerce/modules/class-modules.php
    • > /wp-content/plugins/payamito-sms-woocommerce/Define-constants.php
    • > /wp-content/plugins/payamito-sms-woocommerce/includes/class-woocommerce.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'KIANFR_Fields' not found in wp-content/plugins/payamito-sms-woocommerce/includes/core/payamito-core/admin/settings/payamito_show_other_plugins.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/payamito-sms-woocommerce/includes/core/payamito-core/includes/direct-send/html-send.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/payamito-sms-woocommerce/includes/lib/class-tgm-plugin-activation.php:1996

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
1 plugin tags: sms payamito

payamito-sms-woocommerce/bootstrap.php 77% from 13 tests

The entry point to "افزونه پیامک ووکامرس فوق حرفه ای (جدید) payamito sms woocommerce" version 1.2.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("payamito-sms-woocommerce.php" instead of "bootstrap.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.4.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin77,098 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP1445,0967,21337,334
CSS252,5201,05913,299
JavaScript241,8547399,412
PO File244,1524,8328,811
Sass201,53837,935
JSON400149
Markdown2410142
SVG20016

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity34.15
▷ Minimum class complexity1.00
▷ Maximum class complexity391.00
Average method complexity5.63
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes128
▷ Abstract classes32.34%
▷ Concrete classes12597.66%
▷ Final classes21.60%
Methods920
▷ Static methods16417.83%
▷ Public methods84591.85%
▷ Protected methods444.78%
▷ Private methods313.37%
Functions68
▷ Named functions5885.29%
▷ Anonymous functions1014.71%
Constants35
▷ Global constants2880.00%
▷ Class constants720.00%
▷ Public constants7100.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
8 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/core/payamito-core/assets/images/aparat.png3.96KB2.35KB▼ 40.60%
includes/core/payamito-core/assets/images/puzzle.png2.63KB1.87KB▼ 28.82%
includes/core/payamito-core/assets/images/telegram.png2.98KB1.83KB▼ 38.72%
includes/core/payamito-core/assets/images/symmary-box-image.png28.02KB8.15KB▼ 70.92%
includes/core/payamito-core/assets/images/instagram.png3.87KB2.14KB▼ 44.62%