84% splintr-checkout

Code Review | Splintr Payment Gateway

WordPress plugin Splintr Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: splintr-checkout
  • Plugin version: 0.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Jul 19, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: splintr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by Splintr Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.20 ▲3.83
Dashboard /wp-admin3.31 ▲0.0143.04 ▼4.79
Posts /wp-admin/edit.php3.36 ▲0.0044.64 ▼1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.70 ▼11.83
Media Library /wp-admin/upload.php3.23 ▲0.0035.53 ▲5.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Splintr Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.81 ▲0.441.68 ▼0.1142.84 ▼2.88
Dashboard /wp-admin2,206 ▲185.83 ▲0.95100.94 ▼13.7039.94 ▼7.69
Posts /wp-admin/edit.php2,086 ▼02.05 ▲0.0636.31 ▼0.5836.13 ▼3.04
Add New Post /wp-admin/post-new.php1,533 ▼023.02 ▼0.29655.66 ▼17.7667.32 ▲12.47
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0294.19 ▼7.9241.55 ▼0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 | 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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/splintr-checkout/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/splintr-checkout/views/woocommerce/checkout/splintr-thankyou.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/splintr-checkout/views/woocommerce/checkout/splintr-success.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/splintr-checkout/src/Services/WcSplintrPaymentGateway.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/splintr-checkout/splintr-checkout.php:25
    • > PHP Warning
      Use of undefined constant SPLINTR_CHECKOUT_VERSION - assumed 'SPLINTR_CHECKOUT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/splintr-checkout/config.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires php: Invalid plugin version format
The official readme.txt is a good inspiration

splintr-checkout/splintr-checkout.php Passed 13 tests

The entry point to "Splintr Payment Gateway" version 0.2.3 is a PHP file that has certain tags in its header comment area
52 characters long description:
Plugin for checking out using Splintr payment method

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
No dangerous file extensions were detected1,971 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP203017501,359
Markdown31910282
Sass4140118
CSS214106
JavaScript314948
JSON20047
XML16611

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods111
▷ Static methods2219.82%
▷ Public methods9888.29%
▷ Protected methods76.31%
▷ Private methods65.41%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/src/img/splintr.png1.58KB1.00KB▼ 36.81%
assets/dist/img/splintr.png1.58KB1.00KB▼ 36.81%