73% netpay-payment-gateway-api-module-for-woocommerce

Code Review | NetPay Payment Gateway API Module For WooCommerce

WordPress plugin NetPay Payment Gateway API Module For WooCommercescored73%from 54 tests.

About plugin

  • Plugin page: netpay-payment-ga...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2014
  • Latest release: Sep 8, 2016
  • Number of updates: 16
  • Update frequency: every 57.1 days
  • Top authors: netpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,557 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼1.00ms] Passed 4 tests

An overview of server-side resources used by NetPay Payment Gateway API Module For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3041.66 ▲1.15
Dashboard /wp-admin3.60 ▲0.3051.02 ▲1.71
Posts /wp-admin/edit.php3.72 ▲0.3650.29 ▼1.48
Add New Post /wp-admin/post-new.php6.18 ▲0.3088.84 ▼5.38
Media Library /wp-admin/upload.php3.53 ▲0.3040.04 ▲2.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_np_token
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for NetPay Payment Gateway API Module For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▼0.301.71 ▼0.2641.55 ▼3.28
Dashboard /wp-admin2,198 ▲215.62 ▼0.0390.70 ▲3.6041.59 ▼1.70
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0642.86 ▲0.8441.42 ▲4.29
Add New Post /wp-admin/post-new.php1,526 ▼221.10 ▼2.03607.51 ▼80.6954.16 ▲0.35
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0999.54 ▼5.9443.52 ▼3.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_np_token
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/netpay-payment-gateway-api-module-for-woocommerce/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === NetPay Payment Gateway API Module For WooCommerce=== )
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (NetPay Logo), #2 (Checkout Sample), #3 (WooCommerce Settings), #4 (Plugin Configuration)
The official readme.txt might help

netpay-payment-gateway-api-module-for-woocommerce/index.php 92% from 13 tests

Analyzing the main PHP file in "NetPay Payment Gateway API Module For WooCommerce" version 1.0.5
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("netpay-payment-gateway-api-module-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,881 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33564211,874
CSS1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity85.50
▷ Minimum class complexity50.00
▷ Maximum class complexity121.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods5779.17%
▷ Protected methods00.00%
▷ Private methods1520.83%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin