100% cart-messages-for-woocommerce

Code Review | Cart Messages for WooCommerce

WordPress plugin Cart Messages for WooCommerce scored 100% from 54 tests.

About plugin

  • Plugin page: cart-messages-for...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 5.8.1
  • First release: May 13, 2021
  • Latest release: May 14, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: algoritmika (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 88 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼135.37ms] 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 /2.85 ▲0.1336.98 ▲14.53
Dashboard /wp-admin3.07 ▲0.0257.30 ▲8.78
Posts /wp-admin/edit.php3.13 ▲0.0249.78 ▲5.16
Add New Post /wp-admin/post-new.php5.43 ▼0.0096.38 ▼554.62
Media Library /wp-admin/upload.php3.02 ▲0.0235.82 ▼0.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new 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 /3,679 ▲8315.50 ▲0.219.13 ▲1.4052.07 ▼8.22
Dashboard /wp-admin2,973 ▲395.90 ▼0.07141.62 ▼10.90115.46 ▼8.49
Posts /wp-admin/edit.php2,739 ▼02.80 ▲0.1077.15 ▲9.3692.28 ▲0.83
Add New Post /wp-admin/post-new.php1,670 ▼1319.17 ▲0.44394.68 ▼5.66117.27 ▲5.20
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.01157.67 ▼3.22122.82 ▼2.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
35 characters long description:
Customize WooCommerce cart 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 plugin474 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP687353474

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity10.17
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity15.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%
Constants0
▷ Global constants00.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