89% very-good-collection-payment-gateway

Code Review | Very Good Collection Payment Gateway for WooCommerce

WordPress plugin Very Good Collection Payment Gateway for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: very-good-collect...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Jun 25, 2021
  • Number of updates: 11
  • Update frequency: every 2.6 days
  • Top authors: wafsite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Very Good Collection Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.49 ▲1.59
Dashboard /wp-admin3.31 ▲0.0156.26 ▲10.51
Posts /wp-admin/edit.php3.36 ▲0.0045.97 ▼1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.57 ▼7.33
Media Library /wp-admin/upload.php3.23 ▲0.0033.56 ▼0.23

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

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

Browser metrics Passed 4 tests

Very Good Collection Payment Gateway for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.58 ▼1.011.79 ▲0.1245.43 ▲5.52
Dashboard /wp-admin2,206 ▲215.91 ▲1.04112.16 ▲3.2241.63 ▲0.24
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0133.43 ▼8.2533.39 ▼5.79
Add New Post /wp-admin/post-new.php1,533 ▲1423.33 ▲0.39622.79 ▼62.0260.60 ▼0.02
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.01107.50 ▲8.5846.02 ▼0.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: payment, woocommerce, verygoodcollection, woo

very-good-collection-payment-gateway/woo-verygoodcollection.php 85% from 13 tests

This is the main PHP file of "Very Good Collection Payment Gateway for WooCommerce" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("very-good-collection-payment-gateway.php" instead of "woo-verygoodcollection.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "3.0.0")

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 plugin352 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP253117352

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/powered_by_verygoodcollection.png23.94KB8.56KB▼ 64.25%