78% wc-phoenixgate-payment-gateway

Code Review | Payment Gateway for PhoeniXGate on WooCommerce

WordPress plugin Payment Gateway for PhoeniXGate on WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: wc-phoenixgate-pa...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Aug 29, 2022
  • Latest release: May 12, 2023
  • Number of updates: 6
  • Update frequency: every 42.7 days
  • Top authors: wpspin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 326 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.45ms] Passed 4 tests

This is a short check of server-side resources used by Payment Gateway for PhoeniXGate on WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.28 ▲4.83
Dashboard /wp-admin3.31 ▲0.0143.26 ▼9.26
Posts /wp-admin/edit.php3.36 ▲0.0045.22 ▼0.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.67 ▼11.77
Media Library /wp-admin/upload.php3.23 ▲0.0036.00 ▲3.26

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway for PhoeniXGate on WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.68 ▼0.701.64 ▼0.3137.87 ▼7.71
Dashboard /wp-admin2,209 ▲214.80 ▼0.10102.86 ▼11.5441.23 ▼7.43
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0138.93 ▲1.3835.68 ▼1.48
Add New Post /wp-admin/post-new.php1,533 ▼023.34 ▲0.22654.85 ▼17.4563.97 ▲7.81
Media Library /wp-admin/upload.php1,388 ▼34.33 ▲0.0997.54 ▼3.6544.38 ▼1.64

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-phoenixgate-payment-gateway/admin/partials/woo-phxmn-admin-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-phoenixgate-payment-gateway/public/partials/woo-phxmn-public-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-phoenixgate-payment-gateway/includes/class-woo-phxmn-payment-gateway.php:662
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-phoenixgate-payment-gateway/public/partials/woo-phxmn-check-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

wc-phoenixgate-payment-gateway/wc-phoenixgate-payment-gateway.php Passed 13 tests

The principal PHP file in "Payment Gateway for PhoeniXGate on WooCommerce" v. 2.0.0 is loaded by WordPress automatically on each request
92 characters long description:
Phoenix’s unified e-commerce and multi-channel gateway solution for the payments industry.

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
Good job! No executable or dangerous file extensions detected1,125 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14117702724
JavaScript31873354
CSS20847

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3068.18%
▷ Protected methods00.00%
▷ Private methods1431.82%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.45MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png136.87KB59.79KB▼ 56.32%
assets/banner-772x250.png80.27KB26.67KB▼ 66.77%
assets/screenshot-2.png74.04KB29.59KB▼ 60.04%
assets/icon-128x128.png8.68KB2.98KB▼ 65.61%
assets/icon-256x256.png17.19KB6.38KB▼ 62.89%