78% wcf-replace-remove-cart-button-for-woocommerce

Code Review | WCF Replace & Remove Cart Button for WooCommerce

WordPress plugin WCF Replace & Remove Cart Button for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wcf-replace-remov...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2022
  • Latest release: Dec 15, 2022
  • Number of updates: 5
  • Update frequency: every 12.4 days
  • Top authors: wecode123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by WCF Replace & Remove Cart Button for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.62 ▼5.39
Dashboard /wp-admin3.32 ▲0.0253.03 ▲1.20
Posts /wp-admin/edit.php3.37 ▲0.0175.73 ▲27.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.74 ▼8.36
Media Library /wp-admin/upload.php3.24 ▲0.0142.72 ▲6.84

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

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

Browser metrics Passed 4 tests

WCF Replace & Remove Cart Button for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.48 ▲0.112.80 ▲1.0438.33 ▼6.58
Dashboard /wp-admin2,212 ▲355.82 ▲0.2896.05 ▼5.3132.02 ▼14.36
Posts /wp-admin/edit.php2,120 ▲232.47 ▲0.5138.71 ▲2.3137.27 ▼0.50
Add New Post /wp-admin/post-new.php1,696 ▲16422.91 ▼0.20684.45 ▲16.7335.00 ▼24.55
Media Library /wp-admin/upload.php1,484 ▲814.42 ▲0.32110.27 ▲5.5446.66 ▲1.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wcf-replace-remove-cart-button-for-woocommerce/enquiry_form.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: product_title in wp-content/plugins/wcf-replace-remove-cart-button-for-woocommerce/enquiry_form.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wcf-replace-remove-cart-button-for-woocommerce/option_main.php:52
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/wcf-replace-remove-cart-button-for-woocommerce/enquiry_form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wcf-replace-remove-cart-button-for-woocommerce/wcf_replace_remove_cart_button.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
4 plugin tags: replace cart, remove cart, woocommerce, enquiry button

wcf-replace-remove-cart-button-for-woocommerce/wcf_replace_remove_cart_button.php 92% from 13 tests

The main PHP file in "WCF Replace & Remove Cart Button for WooCommerce" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wcf-replace-remove-cart-button-for-woocommerce.php" instead of "wcf_replace_remove_cart_button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected243 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP312144241
CSS1061
JavaScript1061

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin