89% wc-postfinance-checkout-subscription

Code Review | PostFinance Checkout Subscription

WordPress plugin PostFinance Checkout Subscription scored89%from 54 tests.

About plugin

  • Plugin page: wc-postfinance-ch...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2022
  • Latest release: Nov 24, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: customwebgmbh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by PostFinance Checkout Subscription
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.64 ▲4.65
Dashboard /wp-admin3.31 ▲0.0045.86 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0047.60 ▼1.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.62 ▲2.34
Media Library /wp-admin/upload.php3.23 ▲0.0035.43 ▼0.05

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for PostFinance Checkout Subscription
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.34 ▼1.421.81 ▼0.2741.38 ▼2.06
Dashboard /wp-admin2,206 ▲184.87 ▼0.01109.81 ▲8.9542.11 ▼2.22
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0438.84 ▼1.2434.75 ▼3.66
Add New Post /wp-admin/post-new.php1,542 ▲2118.41 ▼4.98600.56 ▼22.5158.18 ▲6.68
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0696.68 ▼2.8240.73 ▼3.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: processing, recurring payment, psp, webshop, payment...

wc-postfinance-checkout-subscription/woocommerce-postfinancecheckout-subscription.php 85% from 13 tests

"PostFinance Checkout Subscription" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-postfinance-checkout-subscription.php" instead of "woocommerce-postfinancecheckout-subscription.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,084 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP101576071,001
PO File1191972
Markdown16011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.12
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods64
▷ Static methods1117.19%
▷ Public methods4875.00%
▷ Protected methods914.06%
▷ Private methods710.94%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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