84% carmo-woo-product-gtin

Code Review | Carmo Product GTIN for WooCommerce

WordPress plugin Carmo Product GTIN for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: carmo-woo-product...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2023
  • Latest release: Jun 10, 2023
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: carmopereira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /69 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Carmo Product GTIN for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0422.14 ▼17.86
Dashboard /wp-admin3.35 ▲0.0450.57 ▲4.39
Posts /wp-admin/edit.php3.40 ▲0.0448.52 ▼1.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.41 ▼0.69
Media Library /wp-admin/upload.php3.27 ▲0.0433.78 ▲0.98
Carmo GTIN /wp-admin/options-general.php?page=carmo-gtin3.2127.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Carmo Product GTIN for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,476 ▼25913.21 ▼1.080.65 ▼1.0816.09 ▼26.07
Dashboard /wp-admin2,217 ▲264.87 ▼0.05108.49 ▲9.1041.53 ▼0.10
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0240.54 ▲3.7435.87 ▲2.97
Add New Post /wp-admin/post-new.php1,552 ▲3818.22 ▼5.30620.11 ▼38.4561.43 ▼4.84
Media Library /wp-admin/upload.php1,402 ▲144.19 ▼0.02100.92 ▲1.6643.67 ▼2.52
Carmo GTIN /wp-admin/options-general.php?page=carmo-gtin8852.2024.9425.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=carmo-gtin
    • > Notice in wp-content/plugins/carmo-woo-product-gtin/carmo-product-gtin-for-woocommerce.php+171
    Undefined variable: count

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: gtin, upc, ean

carmo-woo-product-gtin/carmo-product-gtin-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Carmo Product GTIN for WooCommerce" version 1.0.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("carmo-woo-product-gtin.php" instead of "carmo-product-gtin-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin288 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22626199
PO File1243989

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png81.18KB24.90KB▼ 69.33%
assets/screenshot-2.png46.38KB14.60KB▼ 68.51%