83% sagepay-form-gateway-for-marketpress

Code Review | SagePay Form Gateway for MarketPress

WordPress plugin SagePay Form Gateway for MarketPress scored83%from 54 tests.

About plugin

  • Plugin page: sagepay-form-gate...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2015
  • Latest release: Oct 27, 2015
  • Number of updates: 6
  • Update frequency: every 35.0 days
  • Top authors: patsatech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.51ms] Passed 4 tests

Analyzing server-side resources used by SagePay Form Gateway for MarketPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.91 ▼5.08
Dashboard /wp-admin3.38 ▲0.0846.25 ▼0.40
Posts /wp-admin/edit.php3.43 ▲0.0848.68 ▲3.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0886.78 ▼15.71
Media Library /wp-admin/upload.php3.31 ▲0.0839.94 ▲3.94

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SagePay Form Gateway for MarketPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.431.77 ▼0.0844.19 ▲3.30
Dashboard /wp-admin2,206 ▲215.91 ▲0.05106.91 ▲1.0039.42 ▼5.75
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.1538.64 ▲1.4935.09 ▲0.90
Add New Post /wp-admin/post-new.php1,533 ▼923.20 ▲4.77631.03 ▲13.3155.63 ▲0.50
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0495.75 ▼11.6140.82 ▼6.25

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sagepay-form-gateway-for-marketpress/sagepay-form.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: credit card, ecommerce, marketpress, sagepay form, payment gateway

sagepay-form-gateway-for-marketpress/sagepay-form.php 77% from 13 tests

This is the main PHP file of "SagePay Form Gateway for MarketPress" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/lang/")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sagepay-form-gateway-for-marketpress.php" instead of "sagepay-form.php")

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
Everything looks great! No dangerous files found in this plugin349 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP193106349

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.21
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin