84% woo-product-attribute-tab

Code Review | Reusable Product Description for WooCommerce

WordPress plugin Reusable Product Description for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-product-attri...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: May 10, 2020
  • Number of updates: 55
  • Update frequency: every 26.5 days
  • Top authors: mjke87 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /6,535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.29ms] Passed 4 tests

A check of server-side resources used by Reusable Product Description for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.64 ▼2.75
Dashboard /wp-admin3.42 ▲0.1247.48 ▲0.85
Posts /wp-admin/edit.php3.54 ▲0.1850.04 ▲4.51
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.71 ▼7.77
Media Library /wp-admin/upload.php3.35 ▲0.1240.32 ▲5.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Reusable Product Description for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.071.89 ▲0.1840.62 ▼5.84
Dashboard /wp-admin2,198 ▲215.67 ▲0.0597.37 ▲7.1444.76 ▲3.58
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0539.86 ▲0.0638.10 ▲3.64
Add New Post /wp-admin/post-new.php1,526 ▼923.35 ▲5.01655.84 ▼0.3651.32 ▼15.69
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.0196.90 ▼6.9140.60 ▼3.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: meta_key in wp-content/plugins/woo-product-attribute-tab/templates/cat-add-form-field.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-attribute-tab/templates/cat-edit-form-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-attribute-tab/templates/pa-add-form-field.php:2
    • > PHP Notice
      Undefined variable: meta_key in wp-content/plugins/woo-product-attribute-tab/templates/cat-edit-form-field.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-attribute-tab/templates/cat-add-form-field.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-product-attribute-tab/templates/pa-edit-form-field.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: product attribute, category description, woocommerce, attribute description, product...

woo-product-attribute-tab/woo-product-attribute-tab.php 92% from 13 tests

The main PHP script in "Reusable Product Description for WooCommerce" version 1.3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected587 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11104413489
PO File1212598

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods512.20%
▷ Public methods3073.17%
▷ Protected methods512.20%
▷ Private methods614.63%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png119.29KB32.58KB▼ 72.69%
assets/screenshot-2.png62.02KB22.30KB▼ 64.04%