89% accept-2checkout-payments-using-contact-form-7

Code Review | Accept 2Checkout Payments Using Contact Form 7

WordPress plugin Accept 2Checkout Payments Using Contact Form 7 scored 89% from 54 tests.

About plugin

  • Plugin page: accept-2checkout-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6.2
  • WordPress version: 5.9.2
  • First release: Oct 29, 2020
  • Latest release: Mar 17, 2021
  • Number of updates: 7
  • Update frequency: every 20.0 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 497 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Accept 2Checkout Payments Using Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.13 ▲4.86
Dashboard /wp-admin3.41 ▲0.0036.32 ▲3.19
Posts /wp-admin/edit.php3.65 ▲0.0038.38 ▲0.26
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.77 ▼1,172.98
Media Library /wp-admin/upload.php3.30 ▲0.0022.77 ▼6.29

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accept 2Checkout Payments Using Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲5815.67 ▲0.077.63 ▲2.053.09 ▲0.73
Dashboard /wp-admin2,874 ▲206.06 ▼0.12119.04 ▼16.09161.10 ▲6.44
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0162.79 ▼2.14140.55 ▼3.81
Add New Post /wp-admin/post-new.php1,661 ▼9117.21 ▼3.81398.03 ▼68.74159.15 ▲3.11
Media Library /wp-admin/upload.php1,695 ▲45.55 ▲0.00144.17 ▼17.48188.03 ▼76.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accept-2checkout-payments-using-contact-form-7/inc/front/template/cf72ch-info.php
  • 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-2checkout-payments-using-contact-form-7/inc/admin/template/cf72ch.template.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
7 plugin tags: payment gateway, two checkout server, wordpress, checkout, e-commerce...

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

The primary PHP file in "Accept 2Checkout Payments Using Contact Form 7" version 1.2 is used by WordPress to initiate all plugin functionality
101 characters long description:
This plugin will integrate 2checkout payment gateway for making your payments through Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin8,665 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,3933915,653
PHP115947252,398
CSS6805614

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.38
▷ Minimum class complexity1.00
▷ Maximum class complexity202.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods57
▷ Static methods11.75%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/cardimage.png31.66KB9.51KB▼ 69.94%