99% woocommerce-show-attributes

Code Review | WooCommerce Show Attributes

WordPress plugin WooCommerce Show Attributes scored 99% from 54 tests.

About plugin

  • Plugin page: woocommerce-show-...
  • Plugin version: 1.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 5.9.2
  • First release: Aug 10, 2014
  • Latest release: Aug 30, 2020
  • Number of updates: 53
  • Update frequency: every 41.8 days
  • Top authors: isabel104 (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

6,000+ active / 58,407 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼292.04ms] Passed 4 tests

A check of server-side resources used by WooCommerce Show Attributes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1854.67 ▲4.21
Dashboard /wp-admin3.52 ▲0.1234.91 ▲1.06
Posts /wp-admin/edit.php3.76 ▲0.1237.88 ▼0.86
Add New Post /wp-admin/post-new.php7.02 ▲0.0299.01 ▼1,168.60
Media Library /wp-admin/upload.php3.41 ▲0.1124.07 ▲0.25

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Show Attributes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4215.89 ▲0.066.19 ▼0.232.54 ▼0.39
Dashboard /wp-admin2,895 ▲416.24 ▲0.16118.04 ▼17.29154.98 ▼7.21
Posts /wp-admin/edit.php2,694 ▲93.24 ▲0.0064.31 ▼0.41142.20 ▼4.06
Add New Post /wp-admin/post-new.php1,661 ▼017.13 ▲0.70414.47 ▲16.53155.54 ▼0.54
Media Library /wp-admin/upload.php1,701 ▲65.46 ▼0.13142.33 ▲2.61184.47 ▼3.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tested up to: Invalid plugin version format
The official readme.txt is a good inspiration

woocommerce-show-attributes/woocommerce-show-attributes.php 85% from 13 tests

This is the main PHP file of "WooCommerce Show Attributes" version 1.6.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

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
Success! There were no dangerous files found in this plugin858 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2151184690
PO File15357168

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity114.00
▷ Minimum class complexity114.00
▷ Maximum class complexity114.00
Average method complexity6.65
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1785.00%
▷ Protected methods00.00%
▷ Private methods315.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin