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

Code Review | Accept SagePay Payments Using Contact Form 7

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

About plugin

  • Plugin page: accept-sagepay-pa...
  • 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: Dec 16, 2020
  • Latest release: Mar 17, 2021
  • Number of updates: 4
  • Update frequency: every 22.8 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 353 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Accept SagePay Payments Using Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0158.32 ▲10.56
Dashboard /wp-admin3.41 ▲0.0032.07 ▼3.64
Posts /wp-admin/edit.php3.64 ▲0.0037.42 ▲0.96
Add New Post /wp-admin/post-new.php6.88 ▼0.0999.30 ▼1,184.69
Media Library /wp-admin/upload.php3.29 ▲0.0022.85 ▼2.09

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accept SagePay Payments Using Contact Form 7: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.82 ▲0.187.16 ▲0.843.22 ▲0.69
Dashboard /wp-admin2,895 ▲416.22 ▲0.06120.09 ▼11.91158.25 ▼0.34
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0162.93 ▼4.43137.73 ▼18.45
Add New Post /wp-admin/post-new.php1,711 ▲1521.47 ▲0.50435.53 ▲11.81169.31 ▲9.88
Media Library /wp-admin/upload.php1,698 ▼35.49 ▼0.02147.46 ▲10.90188.57 ▲7.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/accept-sagepay-payments-using-contact-form-7/inc/front/template/cfspzw-info.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPCF7_ContactForm' not found in wp-content/plugins/accept-sagepay-payments-using-contact-form-7/inc/admin/template/cfspzw.template.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: contact form 7, sagepay server, payment gateway, wordpress, ecommerce...

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

Analyzing the main PHP file in "Accept SagePay Payments Using Contact Form 7" version 1.2
99 characters long description:
This plugin will integrate Sagepay payment gateway for making your payments through Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin8,766 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity43.50
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity5.92
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
▷ Static methods11.64%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions111.11%
▷ Anonymous functions888.89%
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin