78% wc-fill-cart-automatically

Code Review | Fill Cart Automatically for WooCommerce

WordPress plugin Fill Cart Automatically for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wc-fill-cart-auto...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Oct 24, 2022
  • Latest release: May 10, 2023
  • Number of updates: 14
  • Update frequency: every 14.4 days
  • Top authors: manolomunoz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /250 total downloads

Benchmarks

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
Installer ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼7.66ms] Passed 4 tests

A check of server-side resources used by Fill Cart Automatically for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▼0.5421.20 ▼16.60
Dashboard /wp-admin3.43 ▲0.1346.36 ▼6.17
Posts /wp-admin/edit.php3.54 ▲0.1948.59 ▲3.69
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.25 ▼2.44
Media Library /wp-admin/upload.php3.35 ▲0.1332.95 ▼5.43
Fill Cart /wp-admin/admin.php?page=fwc3.2931.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Fill Cart Automatically for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.28 ▼1.071.74 ▲0.0142.96 ▲2.25
Dashboard /wp-admin2,208 ▲206.04 ▲1.1694.80 ▼17.3037.79 ▼3.15
Posts /wp-admin/edit.php2,094 ▲52.04 ▲0.0139.79 ▼3.3634.96 ▼2.23
Add New Post /wp-admin/post-new.php1,542 ▲2318.05 ▼5.23613.86 ▼38.4069.86 ▲21.43
Media Library /wp-admin/upload.php1,393 ▲54.23 ▲0.0294.97 ▼20.6240.66 ▼7.67
Fill Cart /wp-admin/admin.php?page=fwc8481.9030.0027.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fwc
    • > Notice in wp-content/plugins/wc-fill-cart-automatically/admin/class-fill-cart-setting.php+365
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-fill-cart-automatically/wc-fill-cart-automatically.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

wc-fill-cart-automatically/wc-fill-cart-automatically.php 92% from 13 tests

The entry point to "Fill Cart Automatically for WooCommerce" version 1.0.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected719 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP345180516
PO File13738106
JavaScript30249
CSS29048

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin