90% disable-cart-page-for-woocommerce

Code Review | Disable cart page for WooCommerce

WordPress plugin Disable cart page for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: disable-cart-page...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.3
  • WordPress version: 6.3.1
  • First release: May 18, 2017
  • Latest release: Aug 7, 2023
  • Number of updates: 24
  • Update frequency: every 94.7 days
  • Top authors: code4life (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

7,000+ active /49,535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.25ms] Passed 4 tests

Analyzing server-side resources used by Disable cart page for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.29 ▲0.08
Dashboard /wp-admin3.31 ▲0.0049.03 ▼0.35
Posts /wp-admin/edit.php3.36 ▲0.0050.70 ▼2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.89 ▼6.43
Media Library /wp-admin/upload.php3.23 ▲0.0035.32 ▲0.71

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable cart page for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.181.87 ▲0.0144.44 ▼0.45
Dashboard /wp-admin2,195 ▲155.64 ▲0.0392.83 ▼3.3849.72 ▲9.95
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0438.99 ▼1.7735.50 ▼4.01
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▼0.38601.71 ▼119.7857.85 ▲6.39
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.01100.05 ▼1.4241.84 ▼2.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, single product buy, disable cart, redirect to checkout

disable-cart-page-for-woocommerce/disable-cart-page-for-woocommerce.php 92% from 13 tests

The main PHP file in "Disable cart page for WooCommerce" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "2.0")

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
No dangerous file extensions were detected156 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33839114
PO File1113042

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions20
▷ Named functions15.00%
▷ Anonymous functions1995.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
There were not PNG files found in your plugin