68% qr-link-generator-for-wp

Code Review | QR Link Generator for WP

WordPress plugin QR Link Generator for WP scored68%from 54 tests.

About plugin

  • Plugin page: qr-link-generator...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Feb 13, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 10
  • Update frequency: every 27.7 days
  • Top authors: racmanuel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /347 total downloads

Benchmarks

Plugin footprint 65% 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.97MB] [CPU: ▲3.05ms] Passed 4 tests

Analyzing server-side resources used by QR Link Generator for WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6540.25 ▲1.51
Dashboard /wp-admin4.41 ▲1.1052.53 ▲2.40
Posts /wp-admin/edit.php4.43 ▲1.0758.51 ▲9.40
Add New Post /wp-admin/post-new.php6.99 ▲1.10100.10 ▲1.24
Media Library /wp-admin/upload.php4.32 ▲1.0842.48 ▲7.05
QR Link Generator for WP /wp-admin/options-general.php?page=qr_link_generator_for_wp_settings4.6342.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 513 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for QR Link Generator for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7114.34 ▼0.011.62 ▼0.0540.93 ▲0.93
Dashboard /wp-admin2,238 ▲585.75 ▲0.1097.01 ▲1.6741.77 ▼4.07
Posts /wp-admin/edit.php2,147 ▲472.19 ▲0.2443.16 ▼0.5535.58 ▼1.07
Add New Post /wp-admin/post-new.php1,565 ▲3923.50 ▲0.28689.10 ▲24.7062.96 ▲13.11
Media Library /wp-admin/upload.php1,446 ▲464.28 ▲0.10103.88 ▼9.7744.71 ▼11.05
QR Link Generator for WP /wp-admin/options-general.php?page=qr_link_generator_for_wp_settings1,3292.3854.0829.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin has failed uninstalling correctly, leaving 513 files (4.02MB) in the plugin directory
    • (new file) admin/js/qr-link-generator-for-wp-admin.js
    • (new file) includes/class-qr-link-generator-for-wp-activator.php
    • (new file) admin/class-qr-link-generator-for-wp-admin.php
    • (new file) admin/index.php
    • (new file) README.txt
    • (new file) LICENSE.txt
    • (new file) admin/css/qr-link-generator-for-wp-admin.css
    • (new file) admin/partials/qr-link-generator-for-wp-admin-display.php
    • (new file) includes/class-qr-link-generator-for-wp-i18n.php
    • (new file) includes/class-qr-link-generator-for-wp-deactivator.php
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 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 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/qr-link-generator-for-wp/public/partials/qr-link-generator-for-wp-public-display.php
  • 108× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\Settings\\SettingsContainerAbstract' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-settings-container/tests/TestContainer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/tests/QROptionsTest.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'chillerlan\\Settings\\SettingsContainerInterface' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php:18
    • > PHP Warning
      require_once(wp-content/plugins/qr-link-generator-for-wp/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php): failed to open stream: No such file or directory in wp-content/plugins/qr-link-generator-for-wp/vendor/appsero/client/.php-cs-fixer.dist.php on line 3
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/examples/html.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCode\\Output\\QRImage' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCode\\Data\\QRDataAbstract' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/src/Data/Kanji.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/qr-link-generator-for-wp/vendor/chillerlan/php-qrcode/examples/text.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/qr-link-generator-for-wp/vendor/cmb2/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

qr-link-generator-for-wp/qr-link-generator-for-wp.php Passed 13 tests

Analyzing the main PHP file in "QR Link Generator for WP" version 1.0.5
83 characters long description:
Plugin to Generate QR Code with link inserted by the user in front-end with a form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin63,515 lines of code in 341 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP1514,72915,57314,599
JSON8007,061
CSS152571,1944,597
Markdown743901,506
JavaScript113776371,475
Sass18312291,452
YAML6527198
XML4611167
HTML1260137

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.96
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces16
Interfaces3
Traits4
Classes129
▷ Abstract classes1410.85%
▷ Concrete classes11589.15%
▷ Final classes1613.91%
Methods951
▷ Static methods11912.51%
▷ Public methods74077.81%
▷ Protected methods16717.56%
▷ Private methods444.63%
Functions45
▷ Named functions4293.33%
▷ Anonymous functions36.67%
Constants62
▷ Global constants58.06%
▷ Class constants5791.94%
▷ Public constants5087.72%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/chillerlan/php-qrcode/examples/octocat.png2.41KB2.46KB0.00%
vendor/cmb2/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%