84% cart-reset

Code Review | Cart Reset

WordPress plugin Cart Reset scored84%from 54 tests.

About plugin

  • Plugin page: cart-reset
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2022
  • Latest release: Nov 27, 2022
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: ouzay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼4.67ms] Passed 4 tests

This is a short check of server-side resources used by Cart Reset
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.83 ▼1.20
Dashboard /wp-admin3.31 ▲0.0145.46 ▲0.79
Posts /wp-admin/edit.php3.36 ▲0.0049.34 ▲4.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.85 ▼20.18
Media Library /wp-admin/upload.php3.23 ▲0.0037.36 ▲1.91

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Cart Reset
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.284.69 ▲2.9244.64 ▲6.82
Dashboard /wp-admin2,206 ▲174.81 ▼0.15110.13 ▼12.3840.91 ▼6.25
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0439.26 ▼6.2735.14 ▼0.26
Add New Post /wp-admin/post-new.php1,533 ▼923.05 ▲4.81669.09 ▲44.9053.27 ▼8.99
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.03110.16 ▲4.6547.79 ▲5.60

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/cart-reset/inc/class-wc-cart-reset-integration.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cart-reset/woocommerce-cart-reset-plugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: woocommerce, session, cart

cart-reset/woocommerce-cart-reset-plugin.php 92% from 13 tests

"Cart Reset" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cart-reset.php" instead of "woocommerce-cart-reset-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected56 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2183656

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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 are no PNG files in this plugin