78% bluesnap-payments

Code Review | BlueSnap All-in-One Platform

WordPress plugin BlueSnap All-in-One Platform scored 78% from 54 tests.

About plugin

  • Plugin page: bluesnap-payments
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Aug 9, 2018
  • Latest release: Oct 31, 2022
  • Number of updates: 18
  • Update frequency: every 85.8 days
  • Top authors: bluesnap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.95ms] Passed 4 tests

Server-side resources used by BlueSnap All-in-One Platform
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.11 ▼8.74
Dashboard /wp-admin3.35 ▲0.0445.86 ▲1.90
Posts /wp-admin/edit.php3.40 ▲0.0444.55 ▼5.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.86 ▼13.50
Media Library /wp-admin/upload.php3.27 ▲0.0433.17 ▼0.27
Existing Forms /wp-admin/edit.php?post_type=bls-forms3.3134.71
Add New /wp-admin/post-new.php?post_type=bls-forms3.1333.75
BlueSnap settings /wp-admin/options-general.php?page=bls-forms3.2333.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for BlueSnap All-in-One Platform
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.55 ▼1.201.75 ▼0.2242.88 ▼2.87
Dashboard /wp-admin2,237 ▲854.86 ▼0.82103.69 ▼13.1438.76 ▼3.13
Posts /wp-admin/edit.php2,120 ▲282.02 ▼0.0241.71 ▲0.3035.22 ▼1.78
Add New Post /wp-admin/post-new.php1,560 ▲3223.17 ▲4.90678.02 ▲36.1253.40 ▼15.41
Media Library /wp-admin/upload.php1,416 ▲284.13 ▼0.06107.01 ▲0.4846.91 ▲2.46
Existing Forms /wp-admin/edit.php?post_type=bls-forms1,0901.9630.3029.95
Add New /wp-admin/post-new.php?post_type=bls-forms2,6263.8365.3142.14
BlueSnap settings /wp-admin/options-general.php?page=bls-forms9231.7124.3329.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=bls-forms
    • > Notice in wp-content/plugins/bluesnap-payments/includes/class.blf-admin.php+893
    Undefined index: bs_fields_nonce

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bluesnap-payments/includes/shortcodes.php:295
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bluesnap-payments/includes/pluginSettings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bluesnap-payments/includes/postTypes.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: payment, modal forms

bluesnap-payments/bs-forms.php 77% from 13 tests

The main file in "BlueSnap All-in-One Platform" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bluesnap-payments.php" instead of "bs-forms.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected2,286 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP62131511,713
CSS1277306
JavaScript13326267

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
10 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/AmericanExpress.png4.08KB2.07KB▼ 49.23%
assets/img/DinersClub.png2.40KB1.48KB▼ 38.50%
assets/img/JCB.png1.87KB1.43KB▼ 23.41%
assets/img/Discover.png2.72KB1.87KB▼ 31.27%
assets/img/Mastercard.png1.86KB1.34KB▼ 27.94%