90% cart-messages-for-woocommerce

Code Review | Cart Messages for WooCommerce

WordPress plugin Cart Messages for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: cart-messages-for...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: May 13, 2021
  • Latest release: Oct 13, 2023
  • Number of updates: 12
  • Update frequency: every 73.7 days
  • Top authors: wpcodefactory (58.33%)algoritmika (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,128 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.74ms] Passed 4 tests

Server-side resources used by Cart Messages for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.47 ▼5.49
Dashboard /wp-admin3.32 ▲0.0241.82 ▼4.93
Posts /wp-admin/edit.php3.37 ▲0.0245.75 ▼3.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.15 ▼16.99
Media Library /wp-admin/upload.php3.24 ▲0.0232.29 ▼1.99

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Cart Messages for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.31 ▼0.041.70 ▼0.1136.09 ▼6.54
Dashboard /wp-admin2,195 ▲215.63 ▲0.1093.24 ▲7.4442.62 ▲6.24
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0938.80 ▲1.5838.86 ▲4.97
Add New Post /wp-admin/post-new.php1,535 ▲918.38 ▼5.55601.27 ▼82.4274.33 ▲13.60
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.0694.89 ▲2.3541.39 ▲1.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can take inspiration from this readme.txt

cart-messages-for-woocommerce/cart-messages-for-woocommerce.php Passed 13 tests

"Cart Messages for WooCommerce" version 1.5.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Add and customize WooCommerce cart and checkout notices.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin494 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7102356494

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity10.17
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods38
▷ Static methods12.63%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected