89% woo-add-gtin

Code Review | WooCommerce UPC, EAN, and ISBN

WordPress plugin WooCommerce UPC, EAN, and ISBN scored89%from 54 tests.

About plugin

  • Plugin page: woo-add-gtin
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 3, 2017
  • Latest release: Jul 9, 2021
  • Number of updates: 13
  • Update frequency: every 103.5 days
  • Top authors: scottopolis (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

6,000+ active /35,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.57ms] Passed 4 tests

A check of server-side resources used by WooCommerce UPC, EAN, and ISBN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.75 ▼5.94
Dashboard /wp-admin3.32 ▼0.0349.68 ▼14.27
Posts /wp-admin/edit.php3.37 ▲0.0147.08 ▼3.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.54 ▼23.08
Media Library /wp-admin/upload.php3.24 ▲0.0137.82 ▲3.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce UPC, EAN, and ISBN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.78 ▲0.161.74 ▼0.0944.34 ▲4.32
Dashboard /wp-admin2,203 ▲155.81 ▲0.94104.89 ▼3.9238.30 ▼4.81
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0533.14 ▼9.7736.39 ▼0.84
Add New Post /wp-admin/post-new.php1,519 ▼922.95 ▲4.69647.79 ▲26.8369.61 ▲17.37
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0599.31 ▼6.4342.49 ▼0.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woocommerce, ean, gtin, upc, isbn

woo-add-gtin/woocommerce-gtin.php 85% from 13 tests

"WooCommerce UPC, EAN, and ISBN" version 0.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "4.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-add-gtin.php" instead of "woocommerce-gtin.php")

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
Success! There were no dangerous files found in this plugin271 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3149216242
JavaScript215629

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity15.00
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin