83% wc-paxum-gateway

Code Review | Gateway for PAXUM on WooCommerce

WordPress plugin Gateway for PAXUM on WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-paxum-gateway
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: May 9, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: electricblueindustriesltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /647 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.94ms] Passed 4 tests

A check of server-side resources used by Gateway for PAXUM on WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.62 ▼0.35
Dashboard /wp-admin3.37 ▲0.0648.80 ▼11.99
Posts /wp-admin/edit.php3.42 ▲0.0647.51 ▼2.45
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.23 ▼12.71
Media Library /wp-admin/upload.php3.29 ▲0.0636.45 ▼0.62

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Gateway for PAXUM on WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.42 ▲0.051.63 ▼0.2243.73 ▲0.11
Dashboard /wp-admin2,198 ▲215.57 ▼0.0592.77 ▼4.9343.70 ▲1.34
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0433.29 ▼5.8436.14 ▲2.63
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▲0.48639.60 ▲40.6758.28 ▲8.62
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.0696.76 ▼1.4442.13 ▲0.84

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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 | 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: HTTP_REFERER in wp-content/plugins/wc-paxum-gateway/woocommerce-gateway-paxum-poster.php on line 20

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, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("admin@electric-blue-industries.com")
  • Screenshots: Add descriptions for screenshots #2, #3 in wc-paxum-gateway/assets to your readme.txt
The official readme.txt might help

wc-paxum-gateway/woocommerce-gateway-paxum.php 85% from 13 tests

The main PHP script in "Gateway for PAXUM on WooCommerce" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-paxum-gateway.php" instead of "woocommerce-gateway-paxum.php")
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin368 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2133238368

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/PAXUM.png3.87KB2.28KB▼ 41.19%