90% terminal-for-stripe-and-woocommerce

Code Review | Terminal for Stripe and WooCommerce

WordPress plugin Terminal for Stripe and WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: terminal-for-stri...
  • Plugin version: 2.2.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Nov 1, 2019
  • Latest release: Aug 7, 2023
  • Number of updates: 85
  • Update frequency: every 16.2 days
  • Top authors: arcanedevops (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /5,156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Terminal for Stripe and WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0031.88 ▼5.01
Dashboard /wp-admin3.31 ▲0.0039.42 ▼10.40
Posts /wp-admin/edit.php3.36 ▲0.0044.52 ▼2.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0073.43 ▼16.61
Media Library /wp-admin/upload.php3.23 ▲0.0033.14 ▼2.18

Server storage [IO: ▲0.19MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Terminal for Stripe and WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.131.58 ▼0.1435.30 ▼3.74
Dashboard /wp-admin2,192 ▲185.65 ▲0.03106.54 ▲13.9741.45 ▼9.25
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0338.41 ▲3.9337.56 ▲1.04
Add New Post /wp-admin/post-new.php1,545 ▲1918.09 ▼5.52608.29 ▼6.0170.97 ▲12.73
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.1195.77 ▲1.3042.68 ▲2.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (24 tag instead of maximum 10)
The official readme.txt is a good inspiration

terminal-for-stripe-and-woocommerce/terminal-for-stripe-and-woocommerce.php Passed 13 tests

"Terminal for Stripe and WooCommerce" version 2.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
70 characters long description:
Take credit card payments locally on your store using Stripe Terminal.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,501 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP84015172,501
CSS10130

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity103.17
▷ Minimum class complexity10.00
▷ Maximum class complexity255.00
Average method complexity8.39
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods83
▷ Static methods56.02%
▷ Public methods6881.93%
▷ Protected methods22.41%
▷ Private methods1315.66%
Functions8
▷ Named functions8100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/tfsw-terminal.png20.47KB8.24KB▼ 59.74%