68% wp-qr-code-auto-generator

Code Review | WP QR Code Auto Generator

WordPress plugin WP QR Code Auto Generator scored68%from 54 tests.

About plugin

  • Plugin page: wp-qr-code-auto-g...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Oct 11, 2016
  • Number of updates: 15
  • Update frequency: every 1.9 days
  • Top authors: arkaroy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼7.62ms] Passed 4 tests

Analyzing server-side resources used by WP QR Code Auto Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5739.88 ▼9.59
Dashboard /wp-admin3.87 ▲0.5647.80 ▼2.21
Posts /wp-admin/edit.php3.92 ▲0.5649.53 ▼3.99
Add New Post /wp-admin/post-new.php6.39 ▲0.5087.42 ▼14.68
Media Library /wp-admin/upload.php3.73 ▲0.5038.13 ▲4.05
WP QR Code /wp-admin/options-general.php?page=wp-qr-code-auto-generator3.6936.96

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 429 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP QR Code Auto Generator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.49 ▼0.803.97 ▲2.1040.11 ▲0.11
Dashboard /wp-admin2,207 ▲165.83 ▲0.9095.46 ▼9.9538.54 ▼5.05
Posts /wp-admin/edit.php2,096 ▲102.01 ▲0.0239.17 ▼1.7836.91 ▼0.61
Add New Post /wp-admin/post-new.php1,539 ▲523.40 ▲0.47654.27 ▲24.1065.97 ▲12.70
Media Library /wp-admin/upload.php1,389 ▼24.28 ▲0.1396.60 ▼5.2942.52 ▼1.63
WP QR Code /wp-admin/options-general.php?page=wp-qr-code-auto-generator1,0042.0726.8426.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-qr-code-auto-generator/phpqrcode/index.php
    • > /wp-content/plugins/wp-qr-code-auto-generator/wp-qr-code-auto-generator.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wp-qr-code-auto-generator/includes/constants.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wp-qr-code-auto-generator/wp-qr-code-auto-generator.php Passed 13 tests

The principal PHP file in "WP QR Code Auto Generator" v. 1.1.0 is loaded by WordPress automatically on each request
136 characters long description:
Automatically generate QR Code for pages, posts and custom post types with permalink or shortlink. You can embed QR Code with shortcode.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-qr-code-auto-generator/phpqrcode/tools/merge.bat
6,405 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP201,5102,0526,401
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity32.30
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods366
▷ Static methods12233.33%
▷ Public methods26672.68%
▷ Protected methods9626.23%
▷ Private methods41.09%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants112
▷ Global constants112100.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
40 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
phpqrcode/cache/frame_22.png0.22KB0.21KB▼ 6.19%
phpqrcode/cache/frame_35.png0.24KB0.21KB▼ 9.47%
phpqrcode/cache/frame_31.png0.25KB0.24KB▼ 6.54%
phpqrcode/cache/frame_9.png0.19KB0.19KB▼ 2.01%
phpqrcode/cache/frame_39.png0.26KB0.23KB▼ 9.85%