10% woo-avantgarde-payment-gateway

Code Review | WooCommerce AvantGarde Safexpay

WordPress plugin WooCommerce AvantGarde Safexpay scored10%from 54 tests.

About plugin

  • Plugin page: woo-avantgarde-pa...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2018
  • Latest release: Apr 3, 2018
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: betasoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /751 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/woo-avantgarde-payment-gateway/includes/avantgardelib.php+41
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.72MB] [CPU: ▼53.57ms] Passed 4 tests

Server-side resources used by WooCommerce AvantGarde Safexpay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.195.00 ▼34.72
Dashboard /wp-admin2.30 ▼1.0511.63 ▼50.05
Posts /wp-admin/edit.php2.30 ▼1.067.21 ▼40.24
Add New Post /wp-admin/post-new.php2.30 ▼3.596.70 ▼89.28
Media Library /wp-admin/upload.php2.30 ▼0.936.36 ▼27.17

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

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

Browser metrics Passed 4 tests

WooCommerce AvantGarde Safexpay: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.60 ▼1.051.60 ▼0.3539.53 ▼4.01
Dashboard /wp-admin2,206 ▲184.85 ▼0.18102.37 ▼15.0839.11 ▼6.81
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0440.86 ▲2.5536.81 ▲1.19
Add New Post /wp-admin/post-new.php1,538 ▲423.44 ▲0.29692.34 ▼0.1555.75 ▼4.66
Media Library /wp-admin/upload.php1,391 ▲94.16 ▼0.1498.57 ▼0.2545.51 ▲3.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/woo-avantgarde-payment-gateway/includes/avantgardelib.php+41
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: "paypal.com"
You can look at the official readme.txt

woo-avantgarde-payment-gateway/avantgarde.php 92% from 13 tests

"WooCommerce AvantGarde Safexpay" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-avantgarde-payment-gateway.php" instead of "avantgarde.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,208 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32226601,208

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity57.00
▷ Minimum class complexity3.00
▷ Maximum class complexity113.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods42
▷ Static methods1126.19%
▷ Public methods4095.24%
▷ Protected methods24.76%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/avanthgarde.png15.57KB4.14KB▼ 73.41%