78% tensile-payments

Code Review | Tensile Payments for WooCommerce

WordPress plugin Tensile Payments for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: tensile-payments
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2022
  • Latest release: Mar 11, 2022
  • Number of updates: 5
  • Update frequency: every 12.4 days
  • Top authors: tensilepayments (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 637 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.01MB] [CPU: ▼8.39ms] Passed 4 tests

An overview of server-side resources used by Tensile Payments for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.48 ▼1.94
Dashboard /wp-admin3.31 ▲0.0146.53 ▼1.12
Posts /wp-admin/edit.php3.36 ▲0.0145.94 ▼12.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.79 ▼17.63
Media Library /wp-admin/upload.php3.23 ▲0.0136.14 ▲1.81

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tensile Payments for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.31 ▼1.004.51 ▲2.3737.53 ▼5.84
Dashboard /wp-admin2,209 ▲215.86 ▼0.18122.29 ▲11.4544.00 ▲0.31
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0339.26 ▼1.0135.29 ▼2.89
Add New Post /wp-admin/post-new.php1,534 ▲123.42 ▲0.06662.57 ▲68.9950.07 ▼13.04
Media Library /wp-admin/upload.php1,391 ▲94.24 ▼0.0499.05 ▲2.0742.96 ▼0.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tensile-payments/public/partials/woocommerce-tensile-payments-public-display.php
    • > /wp-content/plugins/tensile-payments/admin/partials/woocommerce-tensile-payments-admin-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/tensile-payments/woocommerce-tensile-payments.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tensile-payments/includes/tensile-main.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: e-commerce, sales, woocommerce, payments, ach...

tensile-payments/woocommerce-tensile-payments.php 77% from 13 tests

"Tensile Payments for WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 369 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tensile-payments.php" instead of "woocommerce-tensile-payments.php")
  • 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,081 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14158600836
JavaScript22751135
CSS23312110

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin