90% payzoft-woo-payment-gateway

Code Review | Payzoft Payment Gateway for WooCommerce

WordPress plugin Payzoft Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: payzoft-woo-payme...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: Aug 13, 2021
  • Latest release: Aug 13, 2021
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: payzoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Payzoft Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.68 ▼2.66
Dashboard /wp-admin3.31 ▲0.0061.63 ▲6.99
Posts /wp-admin/edit.php3.36 ▲0.0048.10 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.03 ▼3.55
Media Library /wp-admin/upload.php3.23 ▲0.0036.35 ▼1.82

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Payzoft Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.03 ▲0.941.76 ▼3.4743.41 ▼3.72
Dashboard /wp-admin2,195 ▲155.58 ▼0.0997.84 ▼1.2444.53 ▲0.75
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0235.61 ▼1.5431.92 ▼3.00
Add New Post /wp-admin/post-new.php1,528 ▼123.34 ▲0.25607.67 ▼43.9557.19 ▲6.69
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.08100.17 ▼0.2141.30 ▲0.27

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

payzoft-woo-payment-gateway/payzoft-woo-payment-gateway.php Passed 13 tests

"Payzoft Payment Gateway for WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
39 characters long description:
WooCommerce payment gateway for Payzoft

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected342 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106117311
JavaScript192631

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/payzoft.png67.66KB14.14KB▼ 79.11%