90% paytr-sanal-pos-woocommerce-iframe-api

Code Review | PayTR Sanal POS WooCommerce - iFrame API

WordPress plugin PayTR Sanal POS WooCommerce - iFrame API scored90%from 54 tests.

About plugin

  • Plugin page: paytr-sanal-pos-w...
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.3
  • WordPress version: 6.3.1
  • First release: Dec 27, 2019
  • Latest release: Jan 10, 2022
  • Number of updates: 71
  • Update frequency: every 10.5 days
  • Top authors: paytrteknik (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10,000+ active /45,932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.46ms] Passed 4 tests

Server-side resources used by PayTR Sanal POS WooCommerce - iFrame API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.50 ▼3.68
Dashboard /wp-admin3.33 ▲0.0248.56 ▼5.12
Posts /wp-admin/edit.php3.38 ▲0.0252.91 ▲3.28
Add New Post /wp-admin/post-new.php5.91 ▲0.02101.21 ▲0.55
Media Library /wp-admin/upload.php3.25 ▲0.0239.05 ▲2.41

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_paytr_iframe_transaction
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by PayTR Sanal POS WooCommerce - iFrame API
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.29 ▼0.321.77 ▼0.1542.27 ▼1.19
Dashboard /wp-admin2,201 ▲245.55 ▼0.0984.43 ▼3.6844.92 ▲3.27
Posts /wp-admin/edit.php2,103 ▼01.99 ▲0.0437.31 ▼4.6134.13 ▼4.11
Add New Post /wp-admin/post-new.php1,529 ▲323.11 ▲0.06669.81 ▲53.4665.53 ▲17.27
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0395.53 ▼12.9442.13 ▼4.31

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: deme, paytr, woocommerce, checkout, sanal pos

paytr-sanal-pos-woocommerce-iframe-api/paytr-sanal-pos-woocommerce-iframe-api.php Passed 13 tests

"PayTR Sanal POS WooCommerce - iFrame API" version 2.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
The infrastructure required to receive payments through WooCommerce with your PayTR membership.

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,128 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP719899899
PO File16596177
JavaScript14247
CSS1004
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.17
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods619.35%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin