73% remove-add-to-cart-woocommerce

Code Review | Remove Add to Cart WooCommerce

WordPress plugin Remove Add to Cart WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: remove-add-to-car...
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Jan 5, 2023
  • Number of updates: 145
  • Update frequency: every 17.0 days
  • Top authors: themelocation (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

7,000+ active /100,820 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▼4.91ms] Passed 4 tests

Server-side resources used by Remove Add to Cart WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6046.53 ▲0.30
Dashboard /wp-admin3.91 ▲0.5757.25 ▼12.59
Posts /wp-admin/edit.php3.97 ▲0.6152.78 ▲4.49
Add New Post /wp-admin/post-new.php6.45 ▲0.5796.00 ▼10.36
Media Library /wp-admin/upload.php3.68 ▲0.4540.57 ▲3.03
Remove Cart & Hide Price /wp-admin/admin.php?page=remove-add-to-cart-woocommerce3.9240.32
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius4.0440.19

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 196 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
fs_accounts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
fs_gdpr
widget_theysaidso_widget
theysaidso_admin_options
fs_debug_mode

Browser metrics Passed 4 tests

Checking browser requirements for Remove Add to Cart WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.36 ▼0.021.76 ▼0.1132.00 ▼10.97
Dashboard /wp-admin2,239 ▲594.92 ▼0.6890.90 ▼4.1843.44 ▲6.02
Posts /wp-admin/edit.php2,145 ▲422.43 ▲0.4240.58 ▲2.6037.82 ▼0.95
Add New Post /wp-admin/post-new.php1,555 ▲1823.34 ▲4.82641.14 ▼27.4452.92 ▼11.44
Media Library /wp-admin/upload.php1,438 ▲384.56 ▲0.36101.87 ▼0.1345.88 ▲0.01
Remove Cart & Hide Price /wp-admin/admin.php?page=remove-add-to-cart-woocommerce9881.8925.0153.06
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0842.0632.8531.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/remove-add-to-cart-woocommerce/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • fs_gdpr

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/remove-add-to-cart-woocommerce/ratcwp-hide-price.php:7

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
3 plugin tags: woocommerce, remove button, add to cart

remove-add-to-cart-woocommerce/index.php 77% from 13 tests

The entry point to "Remove Add to Cart WooCommerce" version 1.4.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "4.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("remove-add-to-cart-woocommerce.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 230 characters long)

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected51,750 lines of code in 144 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218,32217,26534,026
JavaScript73,5351,90017,066
CSS15230444
Markdown1680214

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity89.51
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,268
▷ Static methods19215.14%
▷ Public methods88669.87%
▷ Protected methods171.34%
▷ Private methods36528.79%
Functions114
▷ Named functions114100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.31MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png201.71KB78.36KB▼ 61.15%
assets/images/addify-logo.png7.65KB4.84KB▼ 36.75%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/small_logo_white.png2.51KB0.89KB▼ 64.68%
screenshot-1.png44.60KB20.62KB▼ 53.76%