83% automatically-add-product-to-cart-after-visit-woocommerce

Code Review | Automatically add to cart for woocommerce

WordPress plugin Automatically add to cart for woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: automatically-add...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2014
  • Latest release: Jun 2, 2014
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: Gariest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

An overview of server-side resources used by Automatically add to cart for woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5919.48 ▼24.78
Dashboard /wp-admin3.35 ▲0.0151.86 ▼13.27
Posts /wp-admin/edit.php3.40 ▲0.0550.33 ▼5.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.93 ▼15.15
Media Library /wp-admin/upload.php3.28 ▲0.0538.90 ▲0.59

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Automatically add to cart for woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,445 ▼32614.19 ▼0.430.57 ▼1.2419.43 ▼24.91
Dashboard /wp-admin2,198 ▲215.64 ▼0.0188.83 ▼1.0039.77 ▼3.58
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0439.73 ▲0.2832.34 ▼2.75
Add New Post /wp-admin/post-new.php1,526 ▼1123.68 ▲5.34671.20 ▲2.4064.14 ▼5.07
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0195.13 ▼26.0944.03 ▼7.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatically-add-product-to-cart-after-visit-woocommerce/autoadd2cart.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === automatically-add-product-to-cart-after-visit-woocommerce === )
You can look at the official readme.txt

automatically-add-product-to-cart-after-visit-woocommerce/autoadd2cart.php 92% from 13 tests

The entry point to "Automatically add to cart for woocommerce" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("automatically-add-product-to-cart-after-visit-woocommerce.php" instead of "autoadd2cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin250 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1017250

PHP code Passed 2 tests

A brief analysis 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.54
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%
Functions8
▷ Named functions8100.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
No PNG files were detected