83% woo-each-add-to-cart

Code Review | Woo Each add to cart

WordPress plugin Woo Each add to cart scored83%from 54 tests.

About plugin

  • Plugin page: woo-each-add-to-cart
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Jun 15, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: musus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.89ms] Passed 4 tests

An overview of server-side resources used by Woo Each add to cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.32 ▼5.62
Dashboard /wp-admin3.31 ▲0.0145.84 ▼3.63
Posts /wp-admin/edit.php3.36 ▲0.0048.23 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.65 ▼15.26
Media Library /wp-admin/upload.php3.23 ▲0.0034.14 ▼3.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Each add to cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.271.67 ▼0.1039.01 ▼6.79
Dashboard /wp-admin2,206 ▲185.90 ▲0.01108.81 ▲7.5340.02 ▼6.16
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0538.05 ▼0.2834.30 ▼2.52
Add New Post /wp-admin/post-new.php1,524 ▼1823.38 ▲4.98624.28 ▲12.1055.13 ▲6.82
Media Library /wp-admin/upload.php1,391 ▲64.23 ▼0.01102.47 ▼1.6941.95 ▼3.50

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-each-add-to-cart/each_add_to_cart.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (add items to shopping cart) image not found
The official readme.txt might help

woo-each-add-to-cart/each_add_to_cart.php 92% from 13 tests

"Woo Each add to cart" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-each-add-to-cart.php" instead of "each_add_to_cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15137

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.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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin