10% open-platform-gateway

Code Review | Open Platform Payment Gateway for WooCommerce

WordPress plugin Open Platform Payment Gateway for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: open-platform-gat...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2022
  • Latest release: May 8, 2023
  • Number of updates: 7
  • Update frequency: every 59.6 days
  • Top authors: physcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /924 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'oppg__activation' not found or invalid function name

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.19ms] Passed 4 tests

An overview of server-side resources used by Open Platform Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.99 ▼1.80
Dashboard /wp-admin3.34 ▲0.0449.82 ▲3.80
Posts /wp-admin/edit.php3.39 ▲0.0345.23 ▼5.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.41 ▼7.99
Media Library /wp-admin/upload.php3.27 ▲0.0335.92 ▲2.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Open Platform Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.25 ▼1.315.49 ▲3.7343.95 ▼6.87
Dashboard /wp-admin2,203 ▲124.85 ▼0.01107.60 ▼14.3436.46 ▼7.20
Posts /wp-admin/edit.php2,068 ▼242.14 ▲0.0834.22 ▼7.8032.68 ▼3.09
Add New Post /wp-admin/post-new.php1,542 ▲2818.15 ▲0.59599.17 ▼93.2456.24 ▼7.38
Media Library /wp-admin/upload.php1,388 ▲64.18 ▼0.0896.71 ▼6.3040.59 ▼4.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'oppg__deactivation' not found or invalid function name
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: woocommerce, payment, cryptocurrency, blockchain, woo...

open-platform-gateway/woocommerce-gateway-open.php 85% from 13 tests

The entry point to "Open Platform Payment Gateway for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0" instead of "5.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("open-platform-gateway.php" instead of "woocommerce-gateway-open.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,007 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP48786782,913
JavaScript413661
Markdown129133

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.68
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods164
▷ Static methods7847.56%
▷ Public methods15996.95%
▷ Protected methods10.61%
▷ Private methods42.44%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants34100.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
5 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ethereum.png16.16KB1.31KB▼ 91.89%
assets/images/bitcoincash.png16.25KB1.32KB▼ 91.86%
assets/images/usdc.png5.32KB2.74KB▼ 48.45%
assets/images/bitcoin.png16.21KB1.34KB▼ 91.71%
assets/images/litecoin.png15.76KB1.01KB▼ 93.57%