10% securesubmit

Code Review | WP SecureSubmit

WordPress plugin WP SecureSubmit scored10%from 54 tests.

About plugin

  • Plugin page: securesubmit
  • Plugin version: 1.5.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 5, 2014
  • Latest release: Aug 24, 2023
  • Number of updates: 60
  • Update frequency: every 56.7 days
  • Top authors: markhagan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,431 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/securesubmit/SecureSubmit.php+2162
    Undefined index: jal_db_version

Server metrics [RAM: ▲2.18MB] [CPU: ▲10.20ms] Passed 4 tests

A check of server-side resources used by WP SecureSubmit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.65 ▲2.1954.29 ▲10.16
Dashboard /wp-admin5.49 ▲2.1964.49 ▲12.64
Posts /wp-admin/edit.php5.54 ▲2.1862.23 ▲10.05
Add New Post /wp-admin/post-new.php8.07 ▲2.18104.32 ▲7.94
Media Library /wp-admin/upload.php5.41 ▲2.1859.64 ▲18.68
FAQ /wp-admin/admin.php?page=sub-faq5.3747.27
Reporting /wp-admin/admin.php?page=sub-reporting5.3751.47
Settings /wp-admin/admin.php?page=sub-settings5.4456.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 217 new files
Database: 1 new table, 7 new options
New tables
wp_securesubmit
New WordPress options
widget_recent-comments
securesubmit_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP SecureSubmit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18813.61 ▼0.7510.64 ▲8.8541.32 ▼3.10
Dashboard /wp-admin2,250 ▲504.86 ▼0.1399.85 ▼20.2436.39 ▼18.75
Posts /wp-admin/edit.php2,129 ▲262.04 ▲0.0237.22 ▼1.9435.37 ▼2.81
Add New Post /wp-admin/post-new.php1,550 ▲522.90 ▼0.16617.73 ▼60.6759.13 ▲3.06
Media Library /wp-admin/upload.php1,429 ▲324.23 ▲0.03102.43 ▼17.6449.83 ▲0.44
FAQ /wp-admin/admin.php?page=sub-faq8722.0529.0137.93
Reporting /wp-admin/admin.php?page=sub-reporting8402.0629.8244.94
Settings /wp-admin/admin.php?page=sub-settings1,8066.60138.7285.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_securesubmit
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • securesubmit_options
    • can_compress_scripts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 127× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'HpsPayPlanResourceInterface' not found in wp-content/plugins/securesubmit/lib/src/Abstractions/HpsPayPlanResourceAbstract.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsSoapGatewayService' not found in wp-content/plugins/securesubmit/lib/src/Services/Gateway/HpsDebitService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsGiftCardActivate' not found in wp-content/plugins/securesubmit/lib/src/Entities/Gift/HpsGiftCardBalance.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsSoapGatewayService' not found in wp-content/plugins/securesubmit/lib/src/Services/Fluent/Gateway/HpsFluentCreditService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsPayPlanResourceAbstract' not found in wp-content/plugins/securesubmit/lib/src/Entities/PayPlan/HpsPayPlanSchedule.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsGatewayServiceAbstract' not found in wp-content/plugins/securesubmit/lib/src/Services/Gateway/HpsSoapGatewayService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsSoapGatewayService' not found in wp-content/plugins/securesubmit/lib/src/Services/Gateway/HpsCheckService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsConsumer' not found in wp-content/plugins/securesubmit/lib/src/Entities/Credit/HpsCardHolder.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/securesubmit/lib/src/Services/Fluent/Gateway/Credit/HpsCreditServiceEditBuilder.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'HpsPayPlanCustomerStatus' not found in wp-content/plugins/securesubmit/lib/src/Infrastructure/Enums/HpsPayPlanScheduleStatus.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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: payment, buy now, gateway, heartland, donations...

securesubmit/SecureSubmit.php 92% from 13 tests

Analyzing the main PHP file in "WP SecureSubmit" version 1.5.14
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("securesubmit.php" instead of "SecureSubmit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin11,770 lines of code in 200 files:
LanguageFilesBlank linesComment linesLines of code
PHP1901,8452,67710,086
CSS31013665
Markdown31800420
JavaScript36220330
HTML1170269

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.73
▷ Minimum class complexity1.00
▷ Maximum class complexity226.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes183
▷ Abstract classes2111.48%
▷ Concrete classes16288.52%
▷ Final classes00.00%
Methods535
▷ Static methods6612.34%
▷ Public methods37870.65%
▷ Protected methods9517.76%
▷ Private methods6211.59%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants175
▷ Global constants31.71%
▷ Class constants17298.29%
▷ Public constants172100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.31MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png38.84KB22.11KB▼ 43.08%
assets/logo.png2.13KB1.25KB▼ 41.33%
assets/screenshot-1.png89.06KB45.78KB▼ 48.59%
shield.png0.46KB0.30KB▼ 34.55%
assets/screenshot-3.png72.75KB35.33KB▼ 51.44%