89% gtin-schema-for-woo

Code Review | GTIN Schema for WooCommerce

WordPress plugin GTIN Schema for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: gtin-schema-for-woo
  • Plugin version: 1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 7, 2020
  • Latest release: Jul 17, 2022
  • Number of updates: 18
  • Update frequency: every 36.1 days
  • Top authors: prajapatiraghu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /2,681 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
Install script ran successfully

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

Analyzing server-side resources used by GTIN Schema for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.76 ▼3.10
Dashboard /wp-admin3.32 ▲0.0245.32 ▼5.14
Posts /wp-admin/edit.php3.37 ▲0.0248.33 ▼4.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.80 ▼17.57
Media Library /wp-admin/upload.php3.24 ▲0.0236.91 ▼3.39

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

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

Browser metrics Passed 4 tests

GTIN Schema for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.59 ▼0.701.68 ▼0.6242.13 ▼7.43
Dashboard /wp-admin2,207 ▲164.90 ▼1.15133.27 ▲27.2357.86 ▲13.50
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0140.57 ▲1.0537.13 ▼0.86
Add New Post /wp-admin/post-new.php1,537 ▲1723.33 ▲0.06596.16 ▼91.1546.78 ▼5.68
Media Library /wp-admin/upload.php1,392 ▲14.23 ▼0.0397.03 ▼12.1141.71 ▼4.78

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes: The official readme.txt is a good inspiration

gtin-schema-for-woo/gtin-schema-for-woo.php 92% from 13 tests

The entry point to "GTIN Schema for WooCommerce" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin438 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36799408
JavaScript28030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.50
▷ Minimum class complexity8.00
▷ Maximum class complexity25.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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