84% payware-mobile-payments-for-woocommerce

Code Review | payware Mobile payments for WooCommerce

WordPress plugin payware Mobile payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: payware-mobile-pa...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 13, 2021
  • Latest release: Jul 23, 2023
  • Number of updates: 104
  • Update frequency: every 8.3 days
  • Top authors: payware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by payware Mobile payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.96 ▼1.42
Dashboard /wp-admin3.34 ▲0.0445.52 ▲0.29
Posts /wp-admin/edit.php3.39 ▲0.0347.94 ▲0.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.65 ▼4.98
Media Library /wp-admin/upload.php3.27 ▲0.0336.93 ▲5.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for payware Mobile payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.69 ▼0.701.92 ▲0.3140.02 ▲0.47
Dashboard /wp-admin2,206 ▲184.85 ▼0.13107.91 ▼12.0438.21 ▼8.98
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0036.01 ▼3.8832.10 ▼4.37
Add New Post /wp-admin/post-new.php1,528 ▼823.47 ▲0.43670.77 ▲9.9758.01 ▼0.98
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.01104.83 ▲5.7844.67 ▲1.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payware-mobile-payments-for-woocommerce/includes/class-paywr-gateway.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: qr, woocommerce-extension, pay, payments, code...

payware-mobile-payments-for-woocommerce/payware-mobile-payments-for-woocommerce.php Passed 13 tests

The principal PHP file in "payware Mobile payments for WooCommerce" v. 1.1.0 is loaded by WordPress automatically on each request
53 characters long description:
Receive payments from any payware enabled mobile app.

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
Good job! No executable or dangerous file extensions detected1,628 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP9162296902
SVG212296
JavaScript5245174
CSS2120128
PO File14553125
Markdown1002
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1456.00%
▷ Public methods1872.00%
▷ Protected methods00.00%
▷ Private methods728.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin