77% wc-stan-payment-gateway

Code Review | Stan, la solution de paiement sans carte

WordPress plugin Stan, la solution de paiement sans carte scored77%from 54 tests.

About plugin

  • Plugin page: wc-stan-payment-g...
  • Plugin version: 2.7.10
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2020
  • Latest release: Sep 29, 2023
  • Number of updates: 139
  • Update frequency: every 7.8 days
  • Top authors: jnser (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,099 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.52ms] Passed 4 tests

Server-side resources used by Stan, la solution de paiement sans carte
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.42 ▲2.51
Dashboard /wp-admin3.33 ▲0.0242.20 ▼9.15
Posts /wp-admin/edit.php3.38 ▲0.0244.51 ▼3.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.85 ▼16.18
Media Library /wp-admin/upload.php3.25 ▲0.0237.87 ▲6.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Stan, la solution de paiement sans carte
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.70 ▼0.691.64 ▼0.1544.06 ▼1.85
Dashboard /wp-admin2,214 ▲234.85 ▼1.04109.13 ▲3.2142.52 ▲2.46
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0240.68 ▲0.5536.71 ▼0.33
Add New Post /wp-admin/post-new.php1,527 ▲1323.25 ▲5.80671.53 ▼28.0056.56 ▲4.89
Media Library /wp-admin/upload.php1,399 ▲114.30 ▲0.1097.65 ▼4.2142.68 ▲0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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 | 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 take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-stan-payment-gateway/woo-stan-pay/admin/partials/woo-stan-pay-admin-display.php
    • > /wp-content/plugins/wc-stan-payment-gateway/woo-stan-pay/public/partials/woo-stan-pay-public-display.php
    • > /wp-content/plugins/wc-stan-payment-gateway/admin/partials/woo-stan-pay-admin-display.php
    • > /wp-content/plugins/wc-stan-payment-gateway/public/partials/woo-stan-pay-public-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-stan-payment-gateway/includes/class-wc-stan-payment-gateway.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-stan-payment-gateway/woo-stan-pay/includes/class-wc-stan-payment-gateway.php:31

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 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in wc-stan-payment-gateway/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === wc-stan-payment-gateway === )
Please take inspiration from this readme.txt

wc-stan-payment-gateway/woo-stan-payment-gateway.php 85% from 13 tests

This is the main PHP file of "Stan, la solution de paiement sans carte" version 2.7.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-stan-payment-gateway.php" instead of "woo-stan-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,910 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP234151,1901,440
SVG200275
JavaScript33255183
CSS301212

PHP code Passed 2 tests

Analyzing 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.35
Average class complexity9.71
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods105
▷ Static methods2321.90%
▷ Public methods9186.67%
▷ Protected methods00.00%
▷ Private methods1413.33%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin