83% netpay-hosted-form-for-woocommerce

Code Review | Netpay Payment Gateway For WooCommerce

WordPress plugin Netpay Payment Gateway For WooCommercescored83%from 54 tests.

About plugin

  • Plugin page: netpay-hosted-for...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2014
  • Latest release: Feb 10, 2016
  • Number of updates: 21
  • Update frequency: every 33.4 days
  • Top authors: netpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,645 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.16MB] [CPU: ▼5.36ms] Passed 4 tests

An overview of server-side resources used by Netpay Payment Gateway For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1739.77 ▼4.73
Dashboard /wp-admin3.48 ▲0.1353.24 ▼10.74
Posts /wp-admin/edit.php3.59 ▲0.2452.88 ▼1.67
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.48 ▼4.30
Media Library /wp-admin/upload.php3.40 ▲0.1742.52 ▲9.05

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Netpay Payment Gateway For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.32 ▼0.861.79 ▼0.2145.62 ▲2.93
Dashboard /wp-admin2,218 ▲155.83 ▲0.9698.29 ▼12.6542.14 ▼2.02
Posts /wp-admin/edit.php2,103 ▲62.00 ▼0.0442.07 ▲5.9137.79 ▲6.63
Add New Post /wp-admin/post-new.php1,545 ▼023.42 ▲0.35664.91 ▼25.5854.06 ▼1.06
Media Library /wp-admin/upload.php1,394 ▼64.29 ▲0.08109.11 ▲6.4145.51 ▲2.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just 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 add_action() in wp-content/plugins/netpay-hosted-form-for-woocommerce/index.php:14

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 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Netpay Payment Gateway For WooCommerce=== )
  • Donate link: Invalid URI ("")
  • Screenshots: Add images for these screenshots: #1 (assets/netpay_logo.jpg), #2 (assets/checkout.jpg), #3 (assets/woocommerce_settings_hosted.jpg), #4 (assets/pluging_configuration_hosted.jpg)
The official readme.txt is a good inspiration

netpay-hosted-form-for-woocommerce/index.php 92% from 13 tests

"Netpay Payment Gateway For WooCommerce" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("netpay-hosted-form-for-woocommerce.php" instead of "index.php")

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
There were no executable files found in this plugin918 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1114179918

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin