89% mtasku-payment-for-woocommerce

Code Review | mTasku payment for WooCommerce

WordPress plugin mTasku payment for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: mtasku-payment-fo...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 9
  • Update frequency: every 114.4 days
  • Top authors: mhalmann (55.56%)mtasku (55.56%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼9.81ms] Passed 4 tests

This is a short check of server-side resources used by mTasku payment for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1935.86 ▼14.28
Dashboard /wp-admin3.49 ▲0.1545.93 ▼13.40
Posts /wp-admin/edit.php3.61 ▲0.2545.87 ▲1.92
Add New Post /wp-admin/post-new.php6.07 ▲0.1979.22 ▼13.46
Media Library /wp-admin/upload.php3.42 ▲0.1936.00 ▲4.18

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by mTasku payment for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.23 ▼0.161.62 ▼0.2736.02 ▼6.51
Dashboard /wp-admin2,198 ▲185.60 ▼0.0596.85 ▼1.3943.99 ▲1.06
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0838.76 ▼0.9735.65 ▼0.64
Add New Post /wp-admin/post-new.php1,534 ▼125.46 ▲0.27599.31 ▼61.9262.90 ▼0.45
Media Library /wp-admin/upload.php1,400 ▲34.13 ▼0.0393.93 ▼4.4240.87 ▼1.74

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

readme.txt Passed 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
6 plugin tags: banklink, woocommerce, shop, e-commerce, payment...

mtasku-payment-for-woocommerce/woocommerce-payment-telia-mtasku.php 85% from 13 tests

"mTasku payment for WooCommerce" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.3" instead of "3.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mtasku-payment-for-woocommerce.php" instead of "woocommerce-payment-telia-mtasku.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,025 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP53977171,307
PO File31770396
JavaScript33631171
CSS1131112
SVG21039

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.67
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods93
▷ Static methods77.53%
▷ Public methods5963.44%
▷ Protected methods2931.18%
▷ Private methods55.38%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants28
▷ Global constants00.00%
▷ Class constants28100.00%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin