89% accept-qpay-payments-using-contact-form-7

Code Review | Accept Qpay payments Using Contact form 7

WordPress plugin Accept Qpay payments Using Contact form 7 scored 89% from 54 tests.

About plugin

  • Plugin page: accept-qpay-payme...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Nov 19, 2020
  • Latest release: Mar 17, 2021
  • Number of updates: 3
  • Update frequency: every 39.7 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 365 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Accept Qpay payments Using Contact form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.50 ▲4.91
Dashboard /wp-admin3.41 ▲0.0033.74 ▲0.29
Posts /wp-admin/edit.php3.64 ▲0.0138.17 ▲2.49
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.58 ▼1,208.09
Media Library /wp-admin/upload.php3.29 ▲0.0024.73 ▼1.36
All QPay Payment Details /wp-admin/edit.php?post_type=cfqpzw_data3.1819.24

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Accept Qpay payments Using Contact form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7315.90 ▼0.116.41 ▲0.462.46 ▼0.16
Dashboard /wp-admin2,895 ▲376.11 ▼0.05115.29 ▼16.24156.02 ▼4.93
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0163.72 ▼2.21140.35 ▼7.31
Add New Post /wp-admin/post-new.php1,710 ▲1321.12 ▲3.82429.58 ▼1.73154.52 ▼5.42
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.05143.58 ▲4.24188.44 ▼1.56
All QPay Payment Details /wp-admin/edit.php?post_type=cfqpzw_data280.940.0416.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WPCF7_ContactForm' not found in wp-content/plugins/accept-qpay-payments-using-contact-form-7/inc/admin/template/cf7qpay.template.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=cfqpzw_data
    • > Network (severe)
    wp-admin/edit.php?post_type=cfqpzw_data - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: qpay, payment gateway, wordpress, contact form 7

accept-qpay-payments-using-contact-form-7/accept-qpay-payments-using-contact-form-7.php Passed 13 tests

The primary PHP file in "Accept Qpay payments Using Contact form 7" version 1.1 is used by WordPress to initiate all plugin functionality
96 characters long description:
This plugin will integrate QPay payment gateway for making your payments through Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,906 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81,3263755,197
PHP104476802,115
CSS4723594

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity191.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods58
▷ Static methods11.72%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants11
▷ Global constants11100.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
4 PNG files occupy 0.43MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-4.png73.28KB32.03KB▼ 56.29%
assets/images/screenshot-2.png109.54KB49.49KB▼ 54.82%
assets/images/screenshot-3.png49.70KB24.71KB▼ 50.28%
assets/images/screenshot-1.png207.21KB59.32KB▼ 71.37%