10% woo-paytr-taksit-tab

Code Review | WooCommerce PayTr Taksit Tab

WordPress plugin WooCommerce PayTr Taksit Tab scored10%from 54 tests.

About plugin

  • Plugin page: woo-paytr-taksit-tab
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2018
  • Latest release: Sep 8, 2019
  • Number of updates: 25
  • Update frequency: every 23.8 days
  • Top authors: muratbtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,445 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/woo-paytr-taksit-tab/WoocommercePaytrTaksitTab_Plugin.php+20
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.87MB] [CPU: ▼54.68ms] Passed 4 tests

A check of server-side resources used by WooCommerce PayTr Taksit Tab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.58 ▼38.85
Dashboard /wp-admin2.14 ▼1.176.70 ▼46.46
Posts /wp-admin/edit.php2.14 ▼1.227.77 ▼40.37
Add New Post /wp-admin/post-new.php2.14 ▼3.755.99 ▼93.02
Media Library /wp-admin/upload.php2.14 ▼1.098.53 ▼23.73
PayTr Taksit Tab /wp-admin/plugins.php?page=WoocommercePaytrTaksitTab_PluginSettings2.146.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 11 new options
New WordPress options
WoocommercePaytrTaksitTab_Plugin__version
widget_recent-comments
can_compress_scripts
WoocommercePaytrTaksitTab_Plugin_merchantid
WoocommercePaytrTaksitTab_Plugin_token
widget_theysaidso_widget
WoocommercePaytrTaksitTab_Plugin_baslik
db_upgraded
WoocommercePaytrTaksitTab_Plugin__installed
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce PayTr Taksit Tab
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.73 ▲0.381.65 ▼0.4141.39 ▼6.28
Dashboard /wp-admin2,204 ▲335.65 ▼0.0182.25 ▼8.7039.09 ▲2.07
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0235.82 ▼1.6433.01 ▼1.24
Add New Post /wp-admin/post-new.php1,552 ▲2425.11 ▲1.92615.40 ▼61.5864.14 ▲9.17
Media Library /wp-admin/upload.php1,409 ▲94.17 ▲0.06100.81 ▼3.2244.93 ▼0.83
PayTr Taksit Tab /wp-admin/plugins.php?page=WoocommercePaytrTaksitTab_PluginSettings8392.0323.0931.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 11 options in the database
    • WoocommercePaytrTaksitTab_Plugin_merchantid
    • widget_recent-comments
    • theysaidso_admin_options
    • WoocommercePaytrTaksitTab_Plugin__version
    • WoocommercePaytrTaksitTab_Plugin_token
    • widget_recent-posts
    • db_upgraded
    • WoocommercePaytrTaksitTab_Plugin__installed
    • can_compress_scripts
    • WoocommercePaytrTaksitTab_Plugin_baslik
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/plugins.php?page=WoocommercePaytrTaksitTab_PluginSettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-paytr-taksit-tab/woocommerce/tablo.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-paytr-taksit-tab/woocommerce/woocommerce.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-paytr-taksit-tab/woocommerce-paytr-taksit-tab.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-paytr-taksit-tab/woocommerce/tab.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

woo-paytr-taksit-tab/woocommerce-paytr-taksit-tab.php 85% from 13 tests

The main file in "WooCommerce PayTr Taksit Tab" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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 ("woo-paytr-taksit-tab.php" instead of "woocommerce-paytr-taksit-tab.php")

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
Success! There were no dangerous files found in this plugin547 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1117616532
CSS11015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods4360.56%
▷ Protected methods2839.44%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There are no PNG files in this plugin