89% markup-by-attribute-for-woocommerce

Code Review | Markup by Attribute for WooCommerce

WordPress plugin Markup by Attribute for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: markup-by-attribu...
  • Plugin version: 3.11.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Oct 26, 2023
  • Number of updates: 124
  • Update frequency: every 16.4 days
  • Top authors: MarkTomlinson (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

5,000+ active /40,421 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Markup by Attribute for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.11 ▲0.56
Dashboard /wp-admin3.32 ▲0.0247.96 ▼0.32
Posts /wp-admin/edit.php3.38 ▲0.0244.62 ▼5.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.37 ▼10.98
Media Library /wp-admin/upload.php3.25 ▲0.0237.73 ▲3.83

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Markup by Attribute for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.83 ▲0.3142.68 ▲0.61
Dashboard /wp-admin2,198 ▲245.63 ▲0.0686.24 ▲2.4736.79 ▼7.61
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0232.99 ▼2.9035.84 ▲2.97
Add New Post /wp-admin/post-new.php1,528 ▲223.17 ▲0.03659.84 ▼33.6450.29 ▼12.36
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0992.82 ▼8.1341.02 ▼3.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
5 plugin tags: markup, variation, attribute, price, woocommerce

markup-by-attribute-for-woocommerce/markup-by-attribute-for-woocommerce.php 85% from 13 tests

The principal PHP file in "Markup by Attribute for WooCommerce" v. 3.11.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 221 characters long)

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
Success! There were no dangerous files found in this plugin2,604 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PO File83443441,383
PHP101935981,192
JavaScript23429

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.38
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods916.07%
▷ Public methods4885.71%
▷ Protected methods00.00%
▷ Private methods814.29%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants24
▷ Global constants24100.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
No PNG files were detected