90% woo-varipay

Code Review | WooCommerce Varipay Payment Gateway

WordPress plugin WooCommerce Varipay Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: woo-varipay
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Sep 27, 2018
  • Latest release: Dec 6, 2018
  • Number of updates: 11
  • Update frequency: every 6.4 days
  • Top authors: varipay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 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
Installer ran successfully

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

An overview of server-side resources used by WooCommerce Varipay Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.01 ▼0.21
Dashboard /wp-admin3.32 ▲0.0251.09 ▼2.48
Posts /wp-admin/edit.php3.37 ▲0.0252.97 ▼6.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.80 ▼4.72
Media Library /wp-admin/upload.php3.24 ▲0.0238.91 ▲1.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Varipay Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.21 ▼0.571.54 ▼0.2840.52 ▼3.78
Dashboard /wp-admin2,198 ▲185.60 ▼0.1389.85 ▼8.3342.71 ▼0.20
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0338.44 ▲0.9637.68 ▲2.63
Add New Post /wp-admin/post-new.php1,537 ▲1118.34 ▼4.78632.51 ▼67.7162.10 ▼10.24
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0196.86 ▼9.1344.40 ▼2.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (The settings panel used to configure the gateway.), #2 (Normal checkout with Varipay.), #3 (Checking out with a saved card.)
Please take inspiration from this readme.txt

woo-varipay/woo-varipay.php Passed 13 tests

The primary PHP file in "WooCommerce Varipay Payment Gateway" version 1.0.1 is used by WordPress to initiate all plugin functionality
54 characters long description:
Take credit card payments on your store using Varipay.

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
No dangerous file extensions were detected655 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4351107655

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity31.67
▷ Minimum class complexity3.00
▷ Maximum class complexity77.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods1965.52%
▷ Protected methods00.00%
▷ Private methods1034.48%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/cards.png4.98KB2.14KB▼ 57.03%