78% master-qr-generator

Code Review | Master QR - Automatic QR code generator for WordPress

WordPress plugin Master QR - Automatic QR code generator for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: master-qr-generator
  • Plugin version: 1.2.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2020
  • Latest release: Aug 17, 2023
  • Number of updates: 27
  • Update frequency: every 36.6 days
  • Top authors: sharabindu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,211 total downloads

Benchmarks

Plugin footprint 83% 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.31MB] [CPU: ▲1.26ms] Passed 4 tests

This is a short check of server-side resources used by Master QR - Automatic QR code generator for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2644.78 ▲5.69
Dashboard /wp-admin3.67 ▲0.3657.81 ▼1.84
Posts /wp-admin/edit.php3.72 ▲0.3654.52 ▲5.61
Add New Post /wp-admin/post-new.php6.20 ▲0.3198.83 ▼4.43
Media Library /wp-admin/upload.php3.53 ▲0.3045.78 ▲8.25
QR Code Downlaod /wp-admin/admin.php?page=masterqr_downlaod3.5036.60
Print QR Code /wp-admin/admin.php?page=masterqr_print3.4733.68
Why Upgade /wp-admin/admin.php?page=masterqr_update3.5531.23
Master QR /wp-admin/admin.php?page=masterqr3.5037.80

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Master QR - Automatic QR code generator for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.80 ▼0.565.80 ▲3.8831.16 ▼15.89
Dashboard /wp-admin2,244 ▲645.93 ▲0.2795.55 ▲4.4387.09 ▲42.40
Posts /wp-admin/edit.php2,172 ▲722.44 ▲0.4639.74 ▲0.2134.14 ▼2.21
Add New Post /wp-admin/post-new.php6,312 ▲4,78626.18 ▲3.181,030.06 ▲332.6740.12 ▼23.77
Media Library /wp-admin/upload.php1,464 ▲644.52 ▲0.34109.61 ▲15.5279.63 ▲30.03
QR Code Downlaod /wp-admin/admin.php?page=masterqr_downlaod1,1172.1231.3259.90
Print QR Code /wp-admin/admin.php?page=masterqr_print1,1562.1328.4838.67
Why Upgade /wp-admin/admin.php?page=masterqr_update1,1452.1230.1583.33
Master QR /wp-admin/admin.php?page=masterqr1,6773.0458.8650.22

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 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=masterqr_print
    • > Notice in wp-content/plugins/master-qr-generator/admin/class_masterqr_print.php+93
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=masterqr_print
    • > Notice in wp-content/plugins/master-qr-generator/admin/class_masterqr_print.php+93
    Trying to get property 'name' of non-object

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/master-qr-generator/admin/class_masterqr_print.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/master-qr-generator/admin/pro_features.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/master-qr-generator/admin/class_maserqr_list_view.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

master-qr-generator/master-qr-lite.php 85% from 13 tests

The principal PHP file in "Master QR - Automatic QR code generator for WordPress" v. 1.2.6 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("master-qr-generator.php" instead of "master-qr-lite.php")
  • Description: The description should be shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,779 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP145685961,182
CSS21004563
JavaScript522834

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.25
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods70
▷ Static methods22.86%
▷ Public methods6592.86%
▷ Protected methods00.00%
▷ Private methods57.14%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
18 compressed PNG files occupy 0.46MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/timmimnglogo.png4.27KB4.28KB0.00%
admin/img/eyecolor.png3.61KB3.69KB0.00%
admin/img/downloadqr.png77.39KB76.67KB▼ 0.94%
admin/img/customqr.png86.71KB86.29KB0.49%
admin/img/POSTTYPELOGO.png16.01KB15.43KB▼ 3.60%