89% onepipe-payment-gateway-for-woocommerce

Code Review | OnePipe Payment Gateway for WooCommerce

WordPress plugin OnePipe Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: onepipe-payment-g...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: May 19, 2021
  • Latest release: Jun 11, 2021
  • Number of updates: 9
  • Update frequency: every 2.8 days
  • Top authors: onepipedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.04ms] Passed 4 tests

Analyzing server-side resources used by OnePipe Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.95 ▼2.18
Dashboard /wp-admin3.38 ▲0.0745.95 ▼3.10
Posts /wp-admin/edit.php3.43 ▲0.0744.89 ▼11.86
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.82 ▼19.00
Media Library /wp-admin/upload.php3.30 ▲0.0740.23 ▲2.61

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/onepipe-payment-gateway-for-woocommerce/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/onepipe-payment-gateway-for-woocommerce/assets/icon-128\303\227128.png"
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

OnePipe 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,815 ▲2913.59 ▼0.791.98 ▼0.2042.02 ▼1.99
Dashboard /wp-admin2,221 ▲185.90 ▼0.12105.03 ▼1.9241.08 ▼0.16
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0637.70 ▼3.1233.43 ▼2.98
Add New Post /wp-admin/post-new.php1,551 ▲623.44 ▲0.29660.52 ▲4.3152.57 ▼6.19
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.14111.41 ▲7.1447.80 ▲3.65

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

onepipe-payment-gateway-for-woocommerce/woo-onepipe.php 92% from 13 tests

Analyzing the main PHP file in "OnePipe Payment Gateway for WooCommerce" version 1.0.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("onepipe-payment-gateway-for-woocommerce.php" instead of "woo-onepipe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin441 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16526441

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128×128.png7.65KB4.07KB▼ 46.85%
assets/images/logo.png1.68KB1.78KB0.00%