78% cart-suggestion-for-woocommerce

Code Review | Cart Suggestion for WooCommerce

WordPress plugin Cart Suggestion for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: cart-suggestion-f...
  • Plugin version: 0.8.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Mar 17, 2021
  • Number of updates: 11
  • Update frequency: every 22.9 days
  • Top authors: cgsmith105 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /402 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.12ms] Passed 4 tests

Server-side resources used by Cart Suggestion for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.62 ▼3.72
Dashboard /wp-admin3.40 ▲0.1048.34 ▲1.15
Posts /wp-admin/edit.php3.51 ▲0.1648.87 ▼1.24
Add New Post /wp-admin/post-new.php5.98 ▲0.1085.19 ▼12.66
Media Library /wp-admin/upload.php3.32 ▲0.0937.72 ▲3.30

Server storage [IO: ▲1.23MB] [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: 136 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Cart Suggestion for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.61 ▼0.171.76 ▼0.5343.92 ▼5.97
Dashboard /wp-admin2,195 ▲245.59 ▲0.0287.53 ▼2.0738.99 ▼1.39
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.1639.09 ▼1.9634.04 ▼3.73
Add New Post /wp-admin/post-new.php1,526 ▼323.35 ▲0.45690.19 ▲50.0155.80 ▲4.22
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.14102.34 ▲3.2645.12 ▲1.39

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

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cart-suggestion-for-woocommerce/vendor/wp-user-manager/wp-optionskit/includes/views/settings-page.php
  • 98× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/cart-suggestion-for-woocommerce/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: woocommerce, checkout, suggestion, cart

cart-suggestion-for-woocommerce/cart-suggestion-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Cart Suggestion for WooCommerce" version 0.8.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin3,616 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.01
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes10.96%
▷ Concrete classes10399.04%
▷ Final classes00.00%
▷ Static methods159.74%
▷ Public methods10467.53%
▷ Protected methods3120.13%
▷ Private methods1912.34%
▷ Named functions1058.82%
▷ Anonymous functions741.18%
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
No PNG images were found in this plugin