84% poli-payments-for-woocommerce

Code Review | POLi Payments for WooCommerce

WordPress plugin POLi Payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: poli-payments-for...
  • Plugin version: 6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Nov 23, 2023
  • Number of updates: 34
  • Update frequency: every 34.4 days
  • Top authors: mattwpoli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /6,946 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.09MB] [CPU: ▼8.31ms] Passed 4 tests

Analyzing server-side resources used by POLi Payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.10 ▼6.44
Dashboard /wp-admin3.41 ▲0.0648.75 ▼14.52
Posts /wp-admin/edit.php3.52 ▲0.1649.38 ▲0.22
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.91 ▼12.50
Media Library /wp-admin/upload.php3.33 ▲0.1034.99 ▲1.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for POLi Payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.70 ▼0.011.61 ▼0.1537.47 ▼5.52
Dashboard /wp-admin2,198 ▲215.60 ▼0.0392.73 ▼6.5339.19 ▼6.20
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0536.83 ▼3.2531.52 ▲0.56
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲0.08664.73 ▲47.1254.94 ▲5.56
Media Library /wp-admin/upload.php1,403 ▲94.20 ▲0.0399.29 ▲3.2744.75 ▲1.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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 | 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/poli-payments-for-woocommerce/poli.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/poli-payments-for-woocommerce/blocks/class-wc-gateway-poli.php:4

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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: polipayments, debit payments, woocommerce, poli, payment gateway

poli-payments-for-woocommerce/poli.php 85% from 13 tests

Analyzing the main PHP file in "POLi Payments for WooCommerce" version 6.2
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.6")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("poli-payments-for-woocommerce.php" instead of "poli.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin881 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP467157717
JavaScript3328164

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.25
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods29
▷ Static methods310.34%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/poli-icon.png0.91KB0.41KB▼ 54.37%
images/poli-icon@3x.png2.67KB0.88KB▼ 66.83%
images/poli-icon@2x.png1.69KB0.62KB▼ 63.67%
images/poli-rec.png1.86KB0.84KB▼ 54.89%