90% ean-for-woocommerce

Code Review | EAN for WooCommerce

WordPress plugin EAN for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: ean-for-woocommerce
  • Plugin version: 4.8.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Oct 28, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 113
  • Update frequency: every 10.0 days
  • Top authors: algoritmika (55.75%)wpcodefactory (45.13%)

Code review

54 tests

User reviews

46 reviews

Install metrics

10,000+ active /243,807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by EAN for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.55 ▼5.86
Dashboard /wp-admin3.32 ▼0.0246.50 ▼14.04
Posts /wp-admin/edit.php3.38 ▲0.0244.82 ▲1.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.06 ▼14.88
Media Library /wp-admin/upload.php3.25 ▲0.0231.87 ▼2.00

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by EAN for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.70 ▲0.371.85 ▼0.2243.22 ▲1.47
Dashboard /wp-admin2,198 ▲215.58 ▼0.0193.24 ▲5.9743.76 ▲3.88
Posts /wp-admin/edit.php2,097 ▼61.96 ▼0.0539.51 ▼0.4533.70 ▼3.87
Add New Post /wp-admin/post-new.php1,528 ▲223.23 ▼0.29589.73 ▼70.0250.10 ▼0.56
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0295.29 ▼0.2644.03 ▲2.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (EAN for WooCommerce - Backend - Simple product), #2 (EAN for WooCommerce - Backend - Variable product), #3 (EAN for WooCommerce - Frontend - Variable product), #4 (EAN for WooCommerce - Admin settings), #5 (EAN for WooCommerce - Tools)
The official readme.txt might help

ean-for-woocommerce/ean-for-woocommerce.php Passed 13 tests

The main file in "EAN for WooCommerce" v. 4.8.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Manage product GTIN (EAN, UPC, ISBN, etc.) in WooCommerce. Beautifully.

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
Everything looks great! No dangerous files found in this plugin5,531 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP306722,1055,452
JavaScript273440
PO File1131539

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity24.50
▷ Minimum class complexity1.00
▷ Maximum class complexity185.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes13.57%
Methods208
▷ Static methods62.88%
▷ Public methods208100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin