83% sagepay-form-gateway-for-easy-digital-downloads

Code Review | SagePay Form Gateway for Easy Digital Downloads

WordPress plugin SagePay Form Gateway for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: sagepay-form-gate...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Oct 30, 2018
  • Number of updates: 11
  • Update frequency: every 117.6 days
  • Top authors: patsatech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /993 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.37ms] Passed 4 tests

This is a short check of server-side resources used by SagePay Form Gateway for Easy Digital Downloads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0249.33 ▲10.11
Dashboard /wp-admin3.31 ▲0.0145.71 ▼5.85
Posts /wp-admin/edit.php3.36 ▲0.0145.56 ▼1.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.94 ▼0.01
Media Library /wp-admin/upload.php3.24 ▲0.0132.79 ▼2.48

Server storage [IO: ▲0.01MB] [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, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

SagePay Form Gateway for Easy Digital Downloads: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼1.142.95 ▲1.1564.44 ▲16.44
Dashboard /wp-admin2,203 ▲155.99 ▲1.1197.62 ▼7.7937.50 ▼6.18
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0539.32 ▲4.3435.41 ▲2.40
Add New Post /wp-admin/post-new.php1,548 ▲3418.07 ▲0.45597.36 ▼102.4172.14 ▲15.62
Media Library /wp-admin/upload.php1,382 ▼34.24 ▲0.06101.72 ▼2.6441.05 ▼0.98

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sagepay-form-gateway-for-easy-digital-downloads/edd-sagepay-form.php:23

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 90% from 29 tests

readme.txt Passed 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
5 plugin tags: easy digital downloads, sagepay, wordpress, ecommerce, payment gateway

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

The main PHP file in "SagePay Form Gateway for Easy Digital Downloads" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sagepay-form-gateway-for-easy-digital-downloads.php" instead of "edd-sagepay-form.php")
  • Domain Path: The domain path folder does not exist ("/lang/")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected244 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15126244

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin