84% product-attribute-on-cart

Code Review | Woocommrece Product Attribute on Cart

WordPress plugin Woocommrece Product Attribute on Cart scored84%from 54 tests.

About plugin

  • Plugin page: product-attribute...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2022
  • Latest release: Sep 12, 2023
  • Number of updates: 3
  • Update frequency: every 203.3 days
  • Top authors: asifalimca.2011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /231 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.70ms] Passed 4 tests

This is a short check of server-side resources used by Woocommrece Product Attribute on Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.23 ▼7.86
Dashboard /wp-admin3.31 ▲0.0143.66 ▼4.77
Posts /wp-admin/edit.php3.36 ▲0.0046.27 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.93 ▼17.68
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▲2.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommrece Product Attribute on Cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.28 ▼1.102.01 ▲0.0241.94 ▼7.13
Dashboard /wp-admin2,206 ▲155.91 ▲0.05107.24 ▲3.6840.68 ▼3.01
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0239.30 ▲4.9633.51 ▼2.18
Add New Post /wp-admin/post-new.php1,533 ▲1418.17 ▼5.08602.57 ▼63.2671.28 ▲15.85
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0896.93 ▼0.6442.58 ▼3.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-attribute-on-cart/product-attribute-on-cart.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: product attribute, color size on cart, add product attribute on cart page

product-attribute-on-cart/product-attribute-on-cart.php Passed 13 tests

The main PHP file in "Woocommrece Product Attribute on Cart" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
This plugin will add product attribute on cart page

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 plugin3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1093

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin