83% wc-upay-manual-payment-gateway

Code Review | wc-upay-manual-payment-gateway

WordPress plugin wc-upay-manual-payment-gateway scored83%from 54 tests.

About plugin

  • Plugin page: wc-upay-manual-pa...
  • Plugin version: 2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7
  • WordPress version: 6.3.1
  • First release: Jun 24, 2021
  • Latest release: Jun 25, 2021
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: hasibmhmd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /829 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.00MB] [CPU: ▼4.26ms] Passed 4 tests

Analyzing server-side resources used by wc-upay-manual-payment-gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.04 ▼3.73
Dashboard /wp-admin3.31 ▲0.0043.85 ▼7.13
Posts /wp-admin/edit.php3.36 ▲0.0045.54 ▼4.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.32 ▲8.47
Media Library /wp-admin/upload.php3.23 ▲0.0033.83 ▼1.41

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for wc-upay-manual-payment-gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.77 ▼0.601.62 ▼0.3238.02 ▼7.34
Dashboard /wp-admin2,206 ▲185.91 ▲0.85100.18 ▼14.9436.39 ▼8.09
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0335.33 ▼3.6933.80 ▼3.40
Add New Post /wp-admin/post-new.php1,533 ▼023.32 ▲0.23737.19 ▲61.8457.06 ▲2.81
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0193.81 ▼18.7742.51 ▼3.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-upay-manual-payment-gateway/upay.php:19

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: upay, payment gateway, payment, wp, woocommerce

wc-upay-manual-payment-gateway/upay.php 69% from 13 tests

The primary PHP file in "wc-upay-manual-payment-gateway" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-upay-manual-payment-gateway.php" instead of "upay.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: The description should be shorter than 140 characters (currently 350 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin299 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28263294
JavaScript1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/upay.png13.44KB3.74KB▼ 72.13%