83% lekirpay-for-woocommerce

Code Review | Lekirpay for WooCommerce

WordPress plugin Lekirpay for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: lekirpay-for-wooc...
  • Plugin version: 3.4.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 25
  • Update frequency: every 44.4 days
  • Top authors: lekirtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.22ms] Passed 4 tests

Analyzing server-side resources used by Lekirpay for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1136.18 ▼3.08
Dashboard /wp-admin3.41 ▲0.0653.39 ▼4.50
Posts /wp-admin/edit.php3.52 ▲0.1750.12 ▲1.51
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.93 ▼2.81
Media Library /wp-admin/upload.php3.33 ▲0.1034.87 ▲3.30

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Lekirpay for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.67 ▲0.461.78 ▲0.2345.39 ▲7.11
Dashboard /wp-admin2,204 ▲275.59 ▲0.0894.66 ▼9.2739.89 ▼6.97
Posts /wp-admin/edit.php2,106 ▲31.98 ▲0.0139.55 ▼3.9336.14 ▼1.54
Add New Post /wp-admin/post-new.php1,535 ▼123.36 ▲0.26593.73 ▼56.0151.20 ▼4.27
Media Library /wp-admin/upload.php1,406 ▲34.23 ▲0.0396.89 ▼0.8540.56 ▼2.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/lekirpay-for-woocommerce/lekirpayWoo.php:39

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: These screenshots require images: #1 (This is the first screen shot), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

lekirpay-for-woocommerce/lekirpayWoo.php 77% from 13 tests

"Lekirpay for WooCommerce" version 3.4.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lekirpay-for-woocommerce.php" instead of "lekirpayWoo.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin702 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5202133654
JavaScript13224
JSON10016
Markdown1408

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity19.33
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods2796.43%
▷ Protected methods13.57%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.PNG21.54KB10.52KB▼ 51.14%
assets/pay_with_lekirpay.png89.10KB27.39KB▼ 69.26%
screenshot-1.PNG54.66KB27.22KB▼ 50.20%