83% barcode-qrcode-generator

Code Review | Barcode QRcode Generator

WordPress plugin Barcode QRcode Generator scored83%from 54 tests.

About plugin

  • Plugin page: barcode-qrcode-ge...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Feb 15, 2018
  • Number of updates: 7
  • Update frequency: every 187.3 days
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /5,804 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.97ms] Passed 4 tests

This is a short check of server-side resources used by Barcode QRcode Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.79 ▼4.23
Dashboard /wp-admin3.31 ▼0.0450.90 ▼12.79
Posts /wp-admin/edit.php3.36 ▲0.0050.15 ▼0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.53 ▼9.52
Media Library /wp-admin/upload.php3.23 ▲0.0037.44 ▼1.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Barcode QRcode Generator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.302.08 ▲0.4036.81 ▼10.61
Dashboard /wp-admin2,195 ▲155.56 ▼0.0492.15 ▼2.1841.75 ▲3.98
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0039.03 ▲3.6135.20 ▲0.00
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.01633.31 ▼33.4157.89 ▲4.44
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.04101.83 ▼1.7342.35 ▼3.95

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Driver.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Upce.php on line 25
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Code39.php on line 26
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Ean13.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Driver.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Code39.php on line 26
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Upca.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Driver.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Int25.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Writer.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2.php on line 25
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Code128.php on line 44
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Postnet.php on line 38
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-qrcode-generator/Image/Barcode2/Driver/Int25.php on line 25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Output Sample) image not found
You can look at the official readme.txt

barcode-qrcode-generator/barcode-qrcode-generator.php 85% from 13 tests

The main file in "Barcode QRcode Generator" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("//")
  • Domain Path: The domain path should use only dashes and lowercase characters ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,054 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,0821,6534,054

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.61
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods210
▷ Static methods6932.86%
▷ Public methods20095.24%
▷ Protected methods00.00%
▷ Private methods104.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants3368.75%
▷ Class constants1531.25%
▷ Public constants15100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1.84KB0.46KB▼ 75.07%