90% text-attributes-for-woocommerce

Code Review | Text Attributes for WooCommerce

WordPress plugin Text Attributes for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: text-attributes-f...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Feb 14, 2020
  • Latest release: Jun 4, 2020
  • Number of updates: 6
  • Update frequency: every 19.0 days
  • Top authors: fiter (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /2,620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Text Attributes for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.36 ▼5.17
Dashboard /wp-admin3.31 ▲0.0145.11 ▼3.30
Posts /wp-admin/edit.php3.36 ▲0.0148.02 ▲2.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.40 ▼2.26
Media Library /wp-admin/upload.php3.24 ▲0.0134.59 ▲3.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Text Attributes for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.671.80 ▼0.4041.75 ▼4.92
Dashboard /wp-admin2,206 ▲185.88 ▼0.13112.23 ▼7.2443.09 ▼1.87
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0341.18 ▲5.9234.29 ▼0.73
Add New Post /wp-admin/post-new.php1,533 ▲1423.50 ▲0.11609.92 ▼35.9267.18 ▲13.27
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0196.93 ▼8.2640.45 ▼5.00

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: attribute type, woocommerce, product attributes, text attribute, attribute

text-attributes-for-woocommerce/text-attributes-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Text Attributes for WooCommerce" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
Allows you to type attribute values in the input field instead of choosing from the drop-down list

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin227 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1071321196
PO File13324
JavaScript1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1575.00%
▷ Protected methods00.00%
▷ Private methods525.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin