83% soukapay-for-woocommerce

Code Review | Soukapay for WooCommerce

WordPress plugin Soukapay for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: soukapay-for-wooc...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2021
  • Latest release: Aug 30, 2022
  • Number of updates: 5
  • Update frequency: every 72.4 days
  • Top authors: teamsoukapay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /286 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Soukapay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.03 ▼3.16
Dashboard /wp-admin3.31 ▼0.0347.65 ▼13.42
Posts /wp-admin/edit.php3.36 ▲0.0144.14 ▲0.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.26 ▼22.28
Media Library /wp-admin/upload.php3.23 ▲0.0135.46 ▲0.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Soukapay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.021.61 ▼0.3244.93 ▲2.87
Dashboard /wp-admin2,206 ▲144.85 ▼0.06115.26 ▲9.8641.63 ▼1.71
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0135.11 ▼0.1531.60 ▼9.75
Add New Post /wp-admin/post-new.php1,533 ▲1123.12 ▲0.00655.57 ▲4.1863.76 ▲10.10
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.02105.45 ▲5.2944.21 ▲3.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/soukapay-for-woocommerce/src/soukapay.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/soukapay-for-woocommerce/src/soukapay.php:7
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/soukapay-for-woocommerce/src/soukapay.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/soukapay-for-woocommerce/src/soukapay.php on line 3
    • > PHP Warning
      include_once(ABSPATHWPINC/class-http.php): failed to open stream: No such file or directory in wp-content/plugins/soukapay-for-woocommerce/src/soukapay.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === soukapay-for-woocommerce === )
Please take inspiration from this readme.txt

soukapay-for-woocommerce/index.php 85% from 13 tests

The entry point to "Soukapay for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.3" instead of "2.6.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("soukapay-for-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
Good job! No executable or dangerous file extensions detected273 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28537273

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin