83% woo-product-barcode-label-printing

Code Review | WooCommerce Product Barcode Label Printing - Woolabel

WordPress plugin WooCommerce Product Barcode Label Printing - Woolabel scored83%from 54 tests.

About plugin

  • Plugin page: woo-product-barco...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2018
  • Latest release: Sep 25, 2022
  • Number of updates: 47
  • Update frequency: every 35.0 days
  • Top authors: wekekaha (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /18,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Product Barcode Label Printing - Woolabel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.97 ▲1.83
Dashboard /wp-admin3.34 ▲0.0445.83 ▲0.19
Posts /wp-admin/edit.php3.39 ▲0.0346.36 ▼2.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.27 ▼2.96
Media Library /wp-admin/upload.php3.26 ▲0.0334.92 ▼4.88

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

WooCommerce Product Barcode Label Printing - Woolabel: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.17 ▼0.411.58 ▼0.4238.43 ▼3.25
Dashboard /wp-admin2,198 ▲215.62 ▼0.0583.55 ▼5.9836.63 ▼2.91
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0232.90 ▼1.0835.82 ▼1.59
Add New Post /wp-admin/post-new.php1,526 ▼15423.00 ▲0.99670.30 ▼13.0054.34 ▼1.23
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.0994.22 ▼6.2144.61 ▼2.34

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
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-barcode-label-printing/inc/functions.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-barcode-label-printing/inc/settings.php:125

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

woo-product-barcode-label-printing/woo-product-barcode-label-printing.php 85% from 13 tests

The entry point to "WooCommerce Product Barcode Label Printing - Woolabel" version 2.2.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 309 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "4.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin773 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP522395763
JavaScript19249
CSS1171

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods444.44%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin