83% web-payment-software-payment-gateway-for-woocommerce

Code Review | Web Payment Software Payment Gateway for WooCommerce

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

About plugin

  • Plugin page: web-payment-softw...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: Jun 26, 2015
  • Number of updates: 13
  • Update frequency: every 80.9 days
  • Top authors: Dualcube (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,531 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.16ms] Passed 4 tests

Analyzing server-side resources used by Web Payment Software Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.71 ▼0.04
Dashboard /wp-admin3.35 ▲0.0150.46 ▼15.74
Posts /wp-admin/edit.php3.46 ▲0.1150.89 ▲3.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.46 ▲0.89
Media Library /wp-admin/upload.php3.27 ▲0.0539.07 ▼1.73

Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/web-payment-software-payment-gateway-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Web Payment Software Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5913.58 ▼0.611.81 ▼0.0947.37 ▲2.25
Dashboard /wp-admin2,226 ▲265.80 ▼0.01100.72 ▼2.0843.81 ▲6.56
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0138.73 ▲0.8340.63 ▲3.55
Add New Post /wp-admin/post-new.php1,537 ▼823.03 ▼0.13655.82 ▼20.8658.30 ▼9.73
Media Library /wp-admin/upload.php1,408 ▲114.25 ▲0.0298.88 ▼19.5144.38 ▼3.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_API' not found in wp-content/plugins/web-payment-software-payment-gateway-for-woocommerce/classes/class-wc-gateway-webpaymentsoftware-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/web-payment-software-payment-gateway-for-woocommerce/woo-includes/woo-functions.php:57

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

web-payment-software-payment-gateway-for-woocommerce/webpaymentsoftware.php 92% from 13 tests

"Web Payment Software Payment Gateway for WooCommerce" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("web-payment-software-payment-gateway-for-woocommerce.php" instead of "webpaymentsoftware.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,187 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7153179552
XML1940518
PO File14444117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.83
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions13
▷ Named functions13100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/cards.png2.11KB1.81KB▼ 14.01%