84% payment-qr-woo

Code Review | Payment QR WooCommerce

WordPress plugin Payment QR WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: payment-qr-woo
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Sep 19, 2023
  • Number of updates: 23
  • Update frequency: every 51.9 days
  • Top authors: fuentes7 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

3,000+ active / 17,446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Payment QR WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.73 ▼2.67
Dashboard /wp-admin3.31 ▲0.0144.17 ▼4.90
Posts /wp-admin/edit.php3.36 ▲0.0045.66 ▲1.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.01 ▼0.18
Media Library /wp-admin/upload.php3.23 ▲0.0033.11 ▼1.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Payment QR WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.181.71 ▼0.0744.74 ▼1.21
Dashboard /wp-admin2,206 ▲185.88 ▲0.06102.68 ▼1.8140.86 ▼2.80
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0134.46 ▼1.0832.27 ▼3.56
Add New Post /wp-admin/post-new.php1,542 ▲918.52 ▼4.71593.73 ▼1.9654.11 ▲2.80
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.0397.95 ▼1.5642.15 ▼2.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payment-qr-woo/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payment-qr-woo/payment-qr-woo.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
7 plugin tags: yape, payment qr woocommerce, plin, woocommerce qr, payment qr...

payment-qr-woo/payment-qr-woo.php Passed 13 tests

The main PHP script in "Payment QR WooCommerce" version 1.1.4 is automatically included on every request by WordPress
72 characters long description:
Add-on for WooCommerce, a payment method to make payments using QR code.

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
There were no executable files found in this plugin914 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP25749362
CSS2204292
JavaScript24212259
SVG1001

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.26
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.23MB with 0.20MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/yape.png232.05KB25.55KB▼ 88.99%