84% kapida-kredi-karti-ile-odeme

Code Review | WC Kredi Karti ile Kapida Odeme

WordPress plugin WC Kredi Karti ile Kapida Odeme scored84%from 54 tests.

About plugin

  • Plugin page: kapida-kredi-kart...
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: Dec 9, 2014
  • Latest release: Feb 16, 2019
  • Number of updates: 22
  • Update frequency: every 69.6 days
  • Top authors: muratbtn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,835 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.98ms] Passed 4 tests

This is a short check of server-side resources used by WC Kredi Karti ile Kapida Odeme
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.76 ▼2.91
Dashboard /wp-admin3.32 ▲0.0149.76 ▲0.14
Posts /wp-admin/edit.php3.37 ▲0.0150.62 ▲3.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.93 ▼20.29
Media Library /wp-admin/upload.php3.24 ▲0.0139.62 ▲4.26

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

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

Browser metrics Passed 4 tests

WC Kredi Karti ile Kapida Odeme: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.17 ▼1.061.77 ▼0.1143.76 ▼3.18
Dashboard /wp-admin2,224 ▲175.79 ▼0.08111.93 ▲3.2340.66 ▲0.71
Posts /wp-admin/edit.php2,106 ▲92.02 ▼0.0134.48 ▼3.1732.47 ▼4.44
Add New Post /wp-admin/post-new.php1,551 ▲1923.08 ▼0.19655.79 ▲21.7755.29 ▼16.56
Media Library /wp-admin/upload.php1,409 ▲94.23 ▼0.12105.71 ▼8.1046.40 ▼2.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/kapida-kredi-karti-ile-odeme/woo-kkko.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/kapida-kredi-karti-ile-odeme/wpmod-odeme.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: pay at the door, payment, woocommerce

kapida-kredi-karti-ile-odeme/wpmod-odeme.php 92% from 13 tests

The primary PHP file in "WC Kredi Karti ile Kapida Odeme" version 1.1.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kapida-kredi-karti-ile-odeme.php" instead of "wpmod-odeme.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected117 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23029117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin