84% payant-woocommerce

Code Review | Payant WooCommerce Payment Gateway

WordPress plugin Payant WooCommerce Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: payant-woocommerce
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Jan 7, 2019
  • Number of updates: 16
  • Update frequency: every 45.9 days
  • Top authors: payantng (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,291 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
Install script ran successfully

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

A check of server-side resources used by Payant WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.68 ▼4.45
Dashboard /wp-admin3.31 ▲0.0055.29 ▼2.62
Posts /wp-admin/edit.php3.36 ▲0.0047.46 ▼7.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.77 ▼53.47
Media Library /wp-admin/upload.php3.23 ▲0.0042.38 ▼15.43

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payant WooCommerce Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▲0.041.97 ▼0.0552.67 ▲4.23
Dashboard /wp-admin2,195 ▲155.62 ▼0.03101.56 ▼10.7950.10 ▲0.04
Posts /wp-admin/edit.php2,103 ▼02.00 ▼0.0042.80 ▲1.2740.81 ▼3.90
Add New Post /wp-admin/post-new.php1,536 ▲1023.00 ▼0.62679.07 ▼142.1659.63 ▼6.93
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.04109.36 ▼32.6852.41 ▼27.18

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payant-woocommerce/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: bank payments, payment gateways, payant, nigeria, woocommerce...

payant-woocommerce/index.php 92% from 13 tests

"Payant WooCommerce Payment Gateway" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("payant-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected353 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110353353

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/payant-cards.png12.44KB4.40KB▼ 64.65%