79% 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 scored79%from 54 tests.

About plugin

  • Plugin page: accept-2checkout-...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2020
  • Latest release: Aug 14, 2023
  • Number of updates: 13
  • Update frequency: every 78.5 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Accept 2Checkout Payments Using Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.07 ▼9.96
Dashboard /wp-admin3.31 ▲0.0044.41 ▼5.24
Posts /wp-admin/edit.php3.36 ▲0.0046.39 ▲2.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.08 ▲6.31
Media Library /wp-admin/upload.php3.23 ▲0.0033.60 ▼1.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Accept 2Checkout Payments Using Contact Form 7: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼0.091.82 ▼2.4337.80 ▼6.04
Dashboard /wp-admin2,206 ▲184.90 ▼1.00101.36 ▼12.1339.04 ▼5.06
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0538.33 ▲3.1433.60 ▲0.27
Add New Post /wp-admin/post-new.php1,542 ▲2218.09 ▼5.00620.02 ▼36.9259.92 ▲12.40
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.0497.64 ▼2.4243.83 ▼0.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 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 a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: payment gateway, contact form 7, e-commerce, 2checkout, two checkout server...

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

The principal PHP file in "Accept 2Checkout Payments Using Contact Form 7" v. 1.3 is loaded by WordPress automatically on each request
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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%