93% sagepay-direct-gateway-for-easy-digital-downloads

Code Review | SagePay Direct Gateway for Easy Digital Downloads

WordPress plugin SagePay Direct Gateway for Easy Digital Downloads scored 93% from 54 tests.

About plugin

  • Plugin page: sagepay-direct-ga...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 5.8.1
  • First release: Apr 19, 2015
  • Latest release: Sep 2, 2016
  • Number of updates: 6
  • Update frequency: every 83.7 days
  • Top authors: patsatech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 714 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.08MB] [CPU: ▼136.61ms] Passed 4 tests

Analyzing server-side resources used by SagePay Direct Gateway for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1935.41 ▲14.53
Dashboard /wp-admin3.14 ▲0.0851.81 ▲8.24
Posts /wp-admin/edit.php3.19 ▲0.0843.30 ▲1.84
Add New Post /wp-admin/post-new.php5.49 ▲0.0690.09 ▼556.33
Media Library /wp-admin/upload.php3.08 ▲0.0833.41 ▼0.17

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for SagePay Direct Gateway for Easy Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲9715.85 ▲0.038.62 ▼0.9756.43 ▲11.98
Dashboard /wp-admin2,992 ▲615.95 ▼0.20138.61 ▼18.13110.11 ▼11.01
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0069.41 ▲0.6582.33 ▼11.21
Add New Post /wp-admin/post-new.php1,672 ▲9118.84 ▲4.55374.45 ▼6.78101.80 ▼7.89
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.00143.19 ▼4.68115.75 ▼0.46

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
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sagepay-direct-gateway-for-easy-digital-downloads/edd-sagepay-direct.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 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
6 plugin tags: sagepay, ecommerce, payment gateway, easy digital downloads, wordpress...

sagepay-direct-gateway-for-easy-digital-downloads/edd-sagepay-direct.php 77% from 13 tests

The main file in "SagePay Direct Gateway for Easy Digital Downloads" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/lang/" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("sagepay-direct-gateway-for-easy-digital-downloads.php" instead of "edd-sagepay-direct.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin368 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18827368

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected