78% qr-code-composer

Code Review | QR Code Composer

WordPress plugin QR Code Composer scored78%from 54 tests.

About plugin

  • Plugin page: qr-code-composer
  • Plugin version: 1.8.0
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 25, 2019
  • Latest release: Jul 9, 2023
  • Number of updates: 45
  • Update frequency: every 29.4 days
  • Top authors: sharabindu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /23,483 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.62MB] [CPU: ▲0.46ms] Passed 4 tests

A check of server-side resources used by QR Code Composer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6039.56 ▲0.73
Dashboard /wp-admin3.98 ▲0.6456.58 ▼0.39
Posts /wp-admin/edit.php4.03 ▲0.6748.32 ▼0.62
Add New Post /wp-admin/post-new.php6.52 ▲0.6387.20 ▲3.29
Media Library /wp-admin/upload.php3.84 ▲0.6134.41 ▲2.10
Bulk Print(PRO) /wp-admin/admin.php?page=qrc_print_pdf3.7832.56
Download All QR (PRO) /wp-admin/admin.php?page=qrc_list_view3.8133.33
QRC Composer /wp-admin/admin.php?page=qr_composer4.0240.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by QR Code Composer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲15613.66 ▼0.967.93 ▲5.8140.17 ▼1.08
Dashboard /wp-admin2,250 ▲595.94 ▲0.0599.48 ▲0.1067.79 ▲23.75
Posts /wp-admin/edit.php2,133 ▲442.04 ▲0.0233.77 ▼6.6029.06 ▼9.93
Add New Post /wp-admin/post-new.php6,285 ▲4,76626.06 ▲2.911,032.56 ▲373.2941.77 ▼18.21
Media Library /wp-admin/upload.php1,429 ▲414.19 ▼0.03100.21 ▲0.9742.84 ▼1.66
Bulk Print(PRO) /wp-admin/admin.php?page=qrc_print_pdf1,1362.0626.4456.02
Download All QR (PRO) /wp-admin/admin.php?page=qrc_list_view1,0502.0623.7333.65
QRC Composer /wp-admin/admin.php?page=qr_composer4,60412.29345.71117.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=qrc_print_pdf
    • > Notice in wp-content/plugins/qr-code-composer/admin/class_qr_code_print.php+115
    Trying to get property 'name' of non-object

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 fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/qr-code-composer/admin/pro_features.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/includes/metadata/class-yoo-filed-data.php:360
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/includes/metadata/class_qrc_defaultmeta.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/admin/class_qrc_shortcode.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/qr-code-composer/admin/extra/vcardShortcodeoptions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/admin/class_qrc_admin_integration.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/admin/class-qrc-plugin-redirect.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-composer/admin/class-qrc-admin-main.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Requires at least: Version format is invalid
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

qr-code-composer/qrc_composer.php 92% from 13 tests

The main PHP script in "QR Code Composer" version 1.8.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("qr-code-composer.php" instead of "qrc_composer.php")

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
No dangerous file extensions were detected5,979 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP259396952,702
CSS2110241,707
JavaScript102462951,569
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.58
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods131
▷ Static methods21.53%
▷ Public methods12696.18%
▷ Protected methods00.00%
▷ Private methods53.82%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
16 compressed PNG files occupy 0.45MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/111.png47.97KB47.20KB▼ 1.61%
admin/img/vcard.png15.67KB14.86KB▼ 5.20%
admin/img/downlad-min.png152.83KB152.24KB0.39%
admin/img/qr-for-bbpress-min.png36.24KB35.40KB▼ 2.33%
admin/img/shot-min.PNG33.74KB33.76KB0.00%