10% sadad-payment

Code Review | Sadad Payment for WooCommerce

WordPress plugin Sadad Payment for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: sadad-payment
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 17, 2023
  • Latest release: Oct 17, 2023
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: sadadpayment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /22 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/sadad-payment/sadad-woocommerce.php+67
    array_key_exists() expects parameter 2 to be array, bool given

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.56ms] Passed 4 tests

An overview of server-side resources used by Sadad Payment for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.68 ▼1.73
Dashboard /wp-admin3.31 ▲0.0050.40 ▼1.70
Posts /wp-admin/edit.php3.36 ▲0.0046.37 ▲1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.50 ▼3.53
Media Library /wp-admin/upload.php3.23 ▲0.0034.05 ▲0.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Sadad Payment for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.23 ▼0.121.81 ▲0.2941.09 ▲0.50
Dashboard /wp-admin2,192 ▲125.49 ▼0.0782.27 ▼8.4637.04 ▼12.41
Posts /wp-admin/edit.php2,097 ▼31.94 ▼0.0733.44 ▼4.1434.38 ▼1.05
Add New Post /wp-admin/post-new.php1,526 ▼223.12 ▲0.14604.77 ▼79.2849.05 ▼9.38
Media Library /wp-admin/upload.php1,397 ▼04.18 ▲0.0398.42 ▼2.8641.72 ▼4.50

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sadad-payment/includes/admin/payment.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sadad-payment/templates/payment.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: sadad pay, e-commerce, payment, woo, sadadpay...

sadad-payment/sadad-woocommerce.php 69% from 13 tests

The main file in "Sadad Payment for WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("sadad-payment.php" instead of "sadad-woocommerce.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.0")

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 detected559 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6111291558
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.50
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods615.38%
▷ Public methods3589.74%
▷ Protected methods410.26%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected