84% woocommerce-sia-gateway

Code Review | WooCommerce Sia Payment Gateway

WordPress plugin WooCommerce Sia Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-sia-g...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.8.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Dec 7, 2016
  • Number of updates: 6
  • Update frequency: every 136.5 days
  • Top authors: iwcontribution (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /886 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by WooCommerce Sia Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼2.11
Dashboard /wp-admin3.32 ▼0.0345.38 ▼22.22
Posts /wp-admin/edit.php3.37 ▲0.0147.09 ▼2.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.66 ▼7.79
Media Library /wp-admin/upload.php3.24 ▲0.0136.65 ▲2.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Sia Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.81 ▲0.161.67 ▼0.1439.88 ▼2.12
Dashboard /wp-admin2,206 ▲155.85 ▼0.13106.27 ▼0.3539.79 ▼1.91
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0138.53 ▼4.9635.47 ▲2.43
Add New Post /wp-admin/post-new.php1,514 ▼1517.70 ▼5.46646.26 ▼33.9657.00 ▲2.00
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.0494.33 ▼12.2942.37 ▼3.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 | 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-sia-gateway/sia.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woocommerce-sia-gateway/sia-gateway.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: woocommerce sia payment gateway, woocommerce extension, payment gateway

woocommerce-sia-gateway/sia-gateway.php 92% from 13 tests

The main PHP file in "WooCommerce Sia Payment Gateway" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-sia-gateway.php" instead of "sia-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected205 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36676205

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.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin