84% easy-qr-code-generator

Code Review | Easy QR Code Generator

WordPress plugin Easy QR Code Generator scored84%from 54 tests.

About plugin

  • Plugin page: easy-qr-code-gene...
  • Plugin version: 0.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Sep 18, 2022
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: byvex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.80ms] Passed 4 tests

An overview of server-side resources used by Easy QR Code Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.49 ▲2.79
Dashboard /wp-admin3.38 ▲0.0345.19 ▼10.96
Posts /wp-admin/edit.php3.43 ▲0.0741.97 ▼8.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.97 ▼10.04
Media Library /wp-admin/upload.php3.31 ▲0.0744.30 ▲9.39

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Easy QR Code Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18514.84 ▲0.462.39 ▲0.4847.50 ▼1.76
Dashboard /wp-admin2,239 ▲514.86 ▼0.07106.61 ▼4.5339.54 ▼6.48
Posts /wp-admin/edit.php2,122 ▲332.05 ▲0.0235.00 ▼5.1033.92 ▼4.15
Add New Post /wp-admin/post-new.php1,547 ▲1418.61 ▼4.61639.55 ▼49.7451.29 ▼5.04
Media Library /wp-admin/upload.php1,421 ▲364.26 ▲0.0498.67 ▼1.9744.18 ▲1.77

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-qr-code-generator/easy-qr-code-generator.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: qr code generator, qr, qrcode

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

The primary PHP file in "Easy QR Code Generator" version 0.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected463 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22226431
JavaScript311932

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/shortcode-in-editor.png101.53KB38.67KB▼ 61.91%