78% sepordeh-woocommerce

Code Review | Sepordeh Payment Gateway for WooCommerce

WordPress plugin Sepordeh Payment Gateway for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: sepordeh-woocommerce
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 6
  • Update frequency: every 121.7 days
  • Top authors: sepordeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /445 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.07MB] [CPU: ▼4.21ms] Passed 4 tests

Server-side resources used by Sepordeh Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.06 ▲0.71
Dashboard /wp-admin3.38 ▲0.0445.65 ▼14.60
Posts /wp-admin/edit.php3.43 ▲0.0846.67 ▲1.21
Add New Post /wp-admin/post-new.php5.96 ▲0.0893.80 ▼4.15
Media Library /wp-admin/upload.php3.30 ▲0.0733.49 ▲1.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Sepordeh Payment Gateway for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.17 ▼0.181.65 ▼0.2344.42 ▲4.75
Dashboard /wp-admin2,195 ▲205.50 ▼0.1582.44 ▼16.0837.23 ▼5.79
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0232.86 ▼3.8934.74 ▲2.94
Add New Post /wp-admin/post-new.php1,404 ▼12418.00 ▼5.40551.64 ▼121.4251.79 ▲2.21
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0696.81 ▼12.7440.22 ▼6.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sepordeh-woocommerce/assets/index.php
    • > /wp-content/plugins/sepordeh-woocommerce/assets/images/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sepordeh-woocommerce/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% 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
4 plugin tags: payment, payment gateway, woocommerce, sepordeh

sepordeh-woocommerce/index.php 92% from 13 tests

The entry point to "Sepordeh Payment Gateway for WooCommerce" version 1.4.1 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 ("sepordeh-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected418 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39715418

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity11.17
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png4.02KB1.20KB▼ 70.19%