84% kopa-qr

Code Review | KOPA QR

WordPress plugin KOPA QR scored84%from 54 tests.

About plugin

  • Plugin page: kopa-qr
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Jul 31, 2023
  • Number of updates: 9
  • Update frequency: every 13.8 days
  • Top authors: ivijanstefan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /215 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by KOPA QR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.82 ▼4.73
Dashboard /wp-admin3.31 ▲0.0144.61 ▼7.88
Posts /wp-admin/edit.php3.43 ▲0.0747.16 ▼2.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.02 ▼20.26
Media Library /wp-admin/upload.php3.24 ▲0.0133.78 ▼1.72

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
woocommerce_kopa_custom_img_position
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
woocommerce_kopa_max_width

Browser metrics Passed 4 tests

KOPA QR: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.55 ▼0.831.55 ▼0.2640.19 ▼4.61
Dashboard /wp-admin2,216 ▲254.84 ▼0.04109.15 ▲5.2240.56 ▼3.63
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0939.65 ▼0.7636.07 ▲0.91
Add New Post /wp-admin/post-new.php1,524 ▼217.62 ▼5.61662.53 ▲71.6051.82 ▲0.05
Media Library /wp-admin/upload.php1,395 ▲104.22 ▼0.0897.94 ▼0.7041.39 ▼2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • woocommerce_kopa_max_width
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • woocommerce_kopa_custom_img_position

Smoke tests 75% from 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 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kopa-qr/kopa-qr.php

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: woocommerce, dokan, products, payments, sopping...

kopa-qr/kopa-qr.php Passed 13 tests

The primary PHP file in "KOPA QR" version 1.0.3 is used by WordPress to initiate all plugin functionality
80 characters long description:
KÖPA allows you to add a QR code for automatic payment to WooCommerce products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,024 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2120139696
PO File25466150
CSS11410119
JavaScript118959

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity67.00
▷ Minimum class complexity67.00
▷ Maximum class complexity67.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/kopa-icon.png0.49KB0.76KB0.00%