83% novatum-payment-gateway-for-woocommerce

Code Review | Novatum Payment Gateway for WooCommerce

WordPress plugin Novatum Payment Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: novatum-payment-g...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Apr 26, 2021
  • Latest release: Aug 10, 2021
  • Number of updates: 7
  • Update frequency: every 15.7 days
  • Top authors: poojathorat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Novatum Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.75 ▼10.61
Dashboard /wp-admin3.33 ▼0.0151.83 ▼10.48
Posts /wp-admin/edit.php3.39 ▲0.0352.86 ▼3.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.65 ▼11.81
Media Library /wp-admin/upload.php3.26 ▲0.0338.76 ▲5.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Novatum Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲2413.30 ▼1.104.26 ▲2.2843.34 ▲3.29
Dashboard /wp-admin2,197 ▲205.65 ▲0.0293.30 ▼4.0538.57 ▼3.86
Posts /wp-admin/edit.php2,118 ▲182.08 ▲0.0539.97 ▼0.9336.41 ▼1.40
Add New Post /wp-admin/post-new.php1,537 ▲918.33 ▼4.62646.05 ▼21.6569.36 ▲4.98
Media Library /wp-admin/upload.php1,405 ▲84.23 ▲0.0498.66 ▼16.6539.10 ▼8.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/novatum-payment-gateway-for-woocommerce/novatum-gateway.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/novatum-payment-gateway-for-woocommerce/credit-card/class-novatum-payment-gateway-cc.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version not formatted correctly
You can take inspiration from this readme.txt

novatum-payment-gateway-for-woocommerce/novatum-gateway.php 77% from 13 tests

The main PHP file in "Novatum Payment Gateway for WooCommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "4.9")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("novatum-payment-gateway-for-woocommerce.php" instead of "novatum-gateway.php")

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
Everything looks great! No dangerous files found in this plugin1,170 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP71693371,052
JavaScript217089
CSS10029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.67
▷ Minimum class complexity5.00
▷ Maximum class complexity49.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2291.67%
▷ Protected methods14.17%
▷ Private methods14.17%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin