88% barcodeman-for-woocommerce

Code Review | Barcode Man for WooCommerce

WordPress plugin Barcode Man for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: barcodeman-for-wo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Oct 5, 2021
  • Latest release: Oct 25, 2021
  • Number of updates: 7
  • Update frequency: every 3.3 days
  • Top authors: gookit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 136 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼138.15ms] Passed 4 tests

Server-side resources used by Barcode Man for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0330.15 ▼0.70
Dashboard /wp-admin3.08 ▲0.0343.64 ▼1.31
Posts /wp-admin/edit.php3.13 ▲0.0341.69 ▼1.50
Add New Post /wp-admin/post-new.php5.44 ▲0.0192.19 ▼548.84
Media Library /wp-admin/upload.php3.02 ▲0.0231.37 ▼0.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Barcode Man for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲12116.01 ▲0.1110.42 ▲0.0752.15 ▼0.89
Dashboard /wp-admin2,975 ▲445.93 ▲0.01132.93 ▼13.01129.39 ▲16.30
Posts /wp-admin/edit.php2,752 ▲132.60 ▼0.1265.07 ▲4.3692.07 ▲2.96
Add New Post /wp-admin/post-new.php1,692 ▲19218.69 ▲0.10387.58 ▲13.39109.01 ▲1.22
Media Library /wp-admin/upload.php1,763 ▼444.98 ▼0.08123.98 ▼20.80137.49 ▲12.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/barcodeman-for-woocommerce/includes/templates/footer.php
    • > /wp-content/plugins/barcodeman-for-woocommerce/includes/templates/header.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/barcodeman-for-woocommerce/includes/templates/support.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/barcodeman-for-woocommerce/includes/templates/connect.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/barcodeman-for-woocommerce/barcode-man-for-woocommerce.php:18
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/barcodeman-for-woocommerce/includes/templates/header.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/barcodeman-for-woocommerce/includes/templates/header.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: address label, barcode, retail, product label, dymo...

barcodeman-for-woocommerce/barcode-man-for-woocommerce.php 77% from 13 tests

The primary PHP file in "Barcode Man for WooCommerce" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "3.0.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("barcodeman-for-woocommerce.php" instead of "barcode-man-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected285 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS1230143
PHP76441142

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods640.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants654.55%
▷ Class constants545.45%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/connect.png193.90KB51.94KB▼ 73.21%
assets/images/barcodeman-menu-icon.png6.79KB2.86KB▼ 57.82%
assets/images/barcodeman-logo-footer.png6.92KB3.16KB▼ 54.41%