83% woo-load-group-attributes-product

Code Review | WooCommerce Load Group Attributes Product

WordPress plugin WooCommerce Load Group Attributes Product scored 83% from 54 tests.

About plugin

  • Plugin page: woo-load-group-at...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 6.3.1
  • First release: May 11, 2019
  • Latest release: May 11, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: alizareikashan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 10,653 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.63ms] Passed 4 tests

Server-side resources used by WooCommerce Load Group Attributes Product
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.87 ▼2.24
Dashboard /wp-admin3.34 ▲0.0444.57 ▼6.62
Posts /wp-admin/edit.php3.39 ▲0.0349.18 ▼1.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.27 ▼4.15
Media Library /wp-admin/upload.php3.26 ▲0.0334.58 ▼1.50

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Load Group Attributes Product
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.65 ▼1.141.66 ▼0.2338.28 ▼11.91
Dashboard /wp-admin2,215 ▲304.84 ▼1.05105.10 ▼2.9944.15 ▼2.77
Posts /wp-admin/edit.php2,098 ▲62.00 ▼0.0440.45 ▼0.3636.49 ▲1.64
Add New Post /wp-admin/post-new.php1,390 ▼12418.85 ▲1.34528.11 ▼125.9860.93 ▲2.41
Media Library /wp-admin/upload.php1,400 ▲124.28 ▲0.10100.48 ▼3.8244.87 ▼2.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-load-group-attributes-product/views/html-product-data-attributes.php:9
    • > PHP Notice
      Undefined variable: post_content in wp-content/plugins/woo-load-group-attributes-product/views/html-ajax-load-attributes.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-load-group-attributes-product/views/html-ajax-load-attributes.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-load-group-attributes-product/views/html-modal-load-attributes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-load-group-attributes-product/views/html-df-select-product.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: iran, woocommerce-attributes, product-attributes, woocommerce, admin...

woo-load-group-attributes-product/woocommerce-load-group-attributes-product.php 85% from 13 tests

The primary PHP file in "WooCommerce Load Group Attributes Product" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-load-group-attributes-product.php" instead of "woocommerce-load-group-attributes-product.php")

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
Good job! No executable or dangerous file extensions detected906 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8190245669
JavaScript1540117
PO File174154104
CSS14016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.00
▷ Minimum class complexity20.00
▷ Maximum class complexity32.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.82MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png124.07KB53.84KB▼ 56.61%
screenshot-5.png75.94KB24.55KB▼ 67.68%
screenshot-1.png262.00KB94.44KB▼ 63.96%
screenshot-6.png170.86KB61.80KB▼ 63.83%
screenshot-3.png124.93KB50.00KB▼ 59.98%