90% wpc-sticky-add-to-cart

Code Review | WPC Sticky Add To Cart for WooCommerce

WordPress plugin WPC Sticky Add To Cart for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-sticky-add-to...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 14, 2021
  • Latest release: Oct 2, 2023
  • Number of updates: 25
  • Update frequency: every 26.2 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /11,553 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.18MB] [CPU: ▼6.35ms] Passed 4 tests

An overview of server-side resources used by WPC Sticky Add To Cart for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.28 ▼10.56
Dashboard /wp-admin3.49 ▲0.1549.84 ▼17.02
Posts /wp-admin/edit.php3.60 ▲0.2552.46 ▲2.40
Add New Post /wp-admin/post-new.php6.09 ▲0.2091.66 ▼0.21
Media Library /wp-admin/upload.php3.41 ▲0.1940.81 ▲3.14
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.3836.05
About /wp-admin/admin.php?page=wpclever3.3836.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Sticky Add To Cart for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14514.28 ▼0.341.99 ▲0.0841.25 ▼6.16
Dashboard /wp-admin2,260 ▲895.83 ▲0.2290.31 ▼13.8871.30 ▲26.22
Posts /wp-admin/edit.php2,181 ▲782.04 ▲0.0134.84 ▼1.7633.94 ▼1.93
Add New Post /wp-admin/post-new.php1,753 ▲22222.46 ▼0.56750.18 ▲57.6863.72 ▲0.03
Media Library /wp-admin/upload.php1,468 ▲684.26 ▲0.02105.48 ▼4.0181.96 ▲34.60
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7412.1835.6754.72
About /wp-admin/admin.php?page=wpclever1,4042.1333.8536.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

wpc-sticky-add-to-cart/wpc-sticky-add-to-cart.php Passed 13 tests

The main PHP file in "WPC Sticky Add To Cart for WooCommerce" ver. 2.0.2 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
WPC Sticky Add To Cart brings about a nicer, customer-friendly sticky add-to-cart bar for your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,736 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP412028943
CSS41016534
JavaScript44816230
SVG10029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity27.50
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin