84% woo-add-empty-cart

Code Review | Woo Add Empty Cart

WordPress plugin Woo Add Empty Cart scored 84% from 54 tests.

About plugin

  • Plugin page: woo-add-empty-cart
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 29, 2015
  • Latest release: Feb 25, 2016
  • Number of updates: 17
  • Update frequency: every 9.0 days
  • Top authors: jomarlipon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active / 2,526 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
This plugin's installer ran successfully

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

A check of server-side resources used by Woo Add Empty Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.75 ▼0.97
Dashboard /wp-admin3.32 ▲0.0244.71 ▼1.94
Posts /wp-admin/edit.php3.37 ▲0.0246.67 ▼0.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.00 ▲3.06
Media Library /wp-admin/upload.php3.25 ▲0.0235.08 ▲1.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Add Empty Cart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.171.88 ▲0.1042.11 ▼9.72
Dashboard /wp-admin2,203 ▲125.83 ▲0.95100.02 ▼9.7739.33 ▼8.24
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0236.28 ▲1.0035.62 ▲2.20
Add New Post /wp-admin/post-new.php1,536 ▲223.31 ▲0.02623.45 ▼65.7255.63 ▼3.78
Media Library /wp-admin/upload.php1,391 ▼04.22 ▼0.02104.36 ▲0.7344.71 ▲1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-add-empty-cart/woo-add-empty-cart.php:16

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

woo-add-empty-cart/woo-add-empty-cart.php Passed 13 tests

The main PHP file in "Woo Add Empty Cart" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
124 characters long description:
Add empty cart button in cart page for Woocommerce only. You can choose where to display the empty cart button in front-end.

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

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin