68% modern-qr-code-generator

Code Review | Modern QR Code Generator

WordPress plugin Modern QR Code Generator scored68%from 54 tests.

About plugin

  • Plugin page: modern-qr-code-ge...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Aug 4, 2022
  • Number of updates: 4
  • Update frequency: every 357.0 days
  • Top authors: csesumonpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /866 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▼2.32ms] Passed 4 tests

This is a short check of server-side resources used by Modern QR Code Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5741.24 ▲1.38
Dashboard /wp-admin3.88 ▲0.5850.59 ▲0.24
Posts /wp-admin/edit.php3.93 ▲0.5746.51 ▼1.12
Add New Post /wp-admin/post-new.php6.40 ▲0.5184.82 ▼9.76
Media Library /wp-admin/upload.php3.79 ▲0.5639.56 ▲6.79

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

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

Browser metrics Passed 4 tests

Modern QR Code Generator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.021.83 ▲0.2341.62 ▲1.03
Dashboard /wp-admin2,186 ▲95.56 ▲0.0386.63 ▼1.9644.04 ▲5.28
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0335.17 ▲1.2433.77 ▼1.35
Add New Post /wp-admin/post-new.php1,528 ▲223.07 ▲0.04597.96 ▼46.4163.50 ▲6.98
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0896.61 ▼0.7842.76 ▼4.88

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_modern_qr_code_main_id

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/modern-qr-code-generator/inc/main/index.php
    • > /wp-content/plugins/modern-qr-code-generator/modern-qr-code-generator.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/modern-qr-code-generator/class/ModernQrCode.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: qr code generator, generate qr code, link qr code generator

modern-qr-code-generator/modern-qr-code-generator.php 92% from 13 tests

Analyzing the main PHP file in "Modern QR Code Generator" version 2.0.1
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/modern-qr-code-generator/inc/main/tools/merge.bat
6,596 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,6472,1676,592
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.86
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods388
▷ Static methods13635.05%
▷ Public methods28473.20%
▷ Protected methods9624.74%
▷ Private methods82.06%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants99
▷ Global constants99100.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
43 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/main/temp/testa0e0cc341823156edc8785d748be1b06.png0.44KB0.42KB▼ 3.78%
inc/main/cache/frame_39.png0.26KB0.23KB▼ 9.85%
inc/main/cache/frame_29.png0.23KB0.21KB▼ 7.76%
inc/main/cache/frame_32.png0.26KB0.25KB▼ 4.20%
inc/main/cache/frame_26.png0.24KB0.22KB▼ 6.56%