78% 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 scored78%from 54 tests.

About plugin

  • Plugin page: accept-sagepay-pa...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Dec 16, 2020
  • Latest release: Sep 29, 2023
  • Number of updates: 15
  • Update frequency: every 67.8 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /855 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼5.78ms] Passed 4 tests

A check of server-side resources used by Accept SagePay Payments Using Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.64 ▼4.71
Dashboard /wp-admin3.31 ▲0.0045.69 ▼4.58
Posts /wp-admin/edit.php3.36 ▲0.0048.02 ▲0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.19 ▼12.15
Media Library /wp-admin/upload.php3.23 ▲0.0032.47 ▼1.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Accept SagePay Payments Using Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.57 ▼0.801.91 ▼0.2639.41 ▼9.85
Dashboard /wp-admin2,206 ▲185.91 ▲0.96101.24 ▼17.3838.70 ▼4.34
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0139.39 ▲4.7537.09 ▲2.99
Add New Post /wp-admin/post-new.php1,514 ▼017.72 ▲0.18684.70 ▲7.8450.27 ▼6.57
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0194.94 ▼1.8840.82 ▼0.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 | 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/accept-sagepay-payments-using-contact-form-7/inc/front/template/cfspzw-info.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

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

This is the main PHP file of "Accept SagePay Payments Using Contact Form 7" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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
No dangerous file extensions were detected8,768 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,4323835,589
PHP116077622,554
CSS8876625

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity43.62
▷ Minimum class complexity1.00
▷ Maximum class complexity250.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods61100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin