90% kaya-qr-code-generator

Code Review | Kaya QR Code Generator

WordPress plugin Kaya QR Code Generator scored90%from 54 tests.

About plugin

  • Plugin page: kaya-qr-code-gene...
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Jul 18, 2023
  • Number of updates: 31
  • Update frequency: every 69.5 days
  • Top authors: kayastudio (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

10,000+ active /87,630 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.05MB] [CPU: ▼3.24ms] Passed 4 tests

A check of server-side resources used by Kaya QR Code Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.47 ▼4.34
Dashboard /wp-admin3.35 ▲0.0444.33 ▼2.48
Posts /wp-admin/edit.php3.46 ▲0.1046.14 ▼0.59
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.20 ▼5.56
Media Library /wp-admin/upload.php3.27 ▲0.0438.94 ▲5.48
QR Code Generator /wp-admin/admin.php?page=wpkqcg-kaya-qr-code-generator-admin-settings-page3.3535.47
Kaya Studio /wp-admin/admin.php?page=kayastudio-plugins-admin-main-page3.2833.83

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_wpkqcg_widget_qrcodewidget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Kaya QR Code Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲17213.22 ▼1.021.89 ▲0.1545.25 ▲7.83
Dashboard /wp-admin2,317 ▲1285.05 ▲0.09101.24 ▼10.8838.90 ▼3.59
Posts /wp-admin/edit.php2,199 ▲1102.04 ▲0.0540.93 ▲5.4735.34 ▲0.78
Add New Post /wp-admin/post-new.php6,682 ▲5,16820.75 ▲3.14944.63 ▲245.0543.29 ▼24.35
Media Library /wp-admin/upload.php1,492 ▲1044.27 ▲0.1099.42 ▲1.3543.86 ▲0.18
QR Code Generator /wp-admin/admin.php?page=wpkqcg-kaya-qr-code-generator-admin-settings-page1,7732.6163.8260.51
Kaya Studio /wp-admin/admin.php?page=kayastudio-plugins-admin-main-page1,0411.7023.3132.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_wpkqcg_widget_qrcodewidget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
No browser errors were detected

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: qr code shortcode, qr code widget, widget, shortcode, woocommerce...

kaya-qr-code-generator/kaya-qr-code-generator.php Passed 13 tests

The main file in "Kaya QR Code Generator" v. 1.5.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Generate QR Code through Widgets and Shortcodes, without any dependencies.

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 detected3,543 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP193817172,088
JavaScript12107297893
PO File1103125289
CSS25023273

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity29.67
▷ Minimum class complexity4.00
▷ Maximum class complexity88.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods63
▷ Static methods4571.43%
▷ Public methods3352.38%
▷ Protected methods00.00%
▷ Private methods3047.62%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin