83% qr-payment-gateway-interface-for-woocommerce

Code Review | DD QR Payment Gateway Interface

WordPress plugin DD QR Payment Gateway Interface scored83%from 54 tests.

About plugin

  • Plugin page: qr-payment-gatewa...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Mar 31, 2021
  • Latest release: Apr 2, 2021
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: ddtickets (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.44ms] Passed 4 tests

This is a short check of server-side resources used by DD QR Payment Gateway Interface
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.68 ▼5.11
Dashboard /wp-admin3.33 ▼0.0149.85 ▼13.20
Posts /wp-admin/edit.php3.38 ▲0.0348.26 ▲3.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.77 ▼17.62
Media Library /wp-admin/upload.php3.25 ▲0.0339.05 ▲2.19

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DD QR Payment Gateway Interface
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.13 ▼0.521.98 ▲0.0845.71 ▲1.25
Dashboard /wp-admin2,198 ▲215.61 ▲0.0492.65 ▼9.2341.79 ▼3.29
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0533.01 ▼3.3133.50 ▼3.18
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▲0.32705.58 ▲38.7558.66 ▲6.32
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.00107.31 ▼5.6745.42 ▼2.55

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/qr-payment-gateway-interface-for-woocommerce/wc-dd-qr-payment-gateway-interface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/qr-payment-gateway-interface-for-woocommerce/classes/class-wc-dd-qr-payment-gateway-interface.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: instant payment, ips qr instant payment, qr payment, payment option, other payment...

qr-payment-gateway-interface-for-woocommerce/wc-dd-qr-payment-gateway-interface.php 69% from 13 tests

"DD QR Payment Gateway Interface" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 205 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("qr-payment-gateway-interface-for-woocommerce.php" instead of "wc-dd-qr-payment-gateway-interface.php")

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
No dangerous file extensions were detected332 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27151332

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
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
images/ips_logo.png4.21KB1.32KB▼ 68.70%