90% cart-total-rounding

Code Review | Cart Total Rounding

WordPress plugin Cart Total Rounding scored90%from 54 tests.

About plugin

  • Plugin page: cart-total-rounding
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9.3
  • WordPress version: 6.3.1
  • First release: Sep 18, 2020
  • Latest release: May 10, 2022
  • Number of updates: 8
  • Update frequency: every 74.9 days
  • Top authors: knaveenchand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.73ms] Passed 4 tests

This is a short check of server-side resources used by Cart Total Rounding
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.57 ▼3.38
Dashboard /wp-admin3.31 ▼0.0455.49 ▼15.88
Posts /wp-admin/edit.php3.36 ▲0.0051.28 ▼1.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.56 ▼20.90
Media Library /wp-admin/upload.php3.23 ▲0.0037.15 ▼2.75

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Cart Total Rounding
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.17 ▼0.181.70 ▼0.3246.71 ▲2.13
Dashboard /wp-admin2,195 ▲155.62 ▼0.0584.29 ▼1.7042.03 ▲2.72
Posts /wp-admin/edit.php2,082 ▼152.04 ▲0.0134.49 ▼0.9934.78 ▲2.13
Add New Post /wp-admin/post-new.php1,528 ▼023.27 ▲0.28684.40 ▼19.0654.49 ▼7.99
Media Library /wp-admin/upload.php1,400 ▲34.15 ▼0.03110.14 ▲8.7346.29 ▼0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: woocommerce, rounding, cart

cart-total-rounding/cart-total-rounding.php 92% from 13 tests

The entry point to "Cart Total Rounding" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151812

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

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