84% woo-keep-the-change

Code Review | eCommerce Keep The Change

WordPress plugin eCommerce Keep The Change scored84%from 54 tests.

About plugin

  • Plugin page: woo-keep-the-change
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.4.0
  • WordPress version: 6.3.1
  • First release: Mar 14, 2016
  • Latest release: Mar 7, 2020
  • Number of updates: 26
  • Update frequency: every 56.6 days
  • Top authors: ahmadbilaldev (53.85%)mrahmadawais (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,197 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.39MB] [CPU: ▼2.07ms] Passed 4 tests

This is a short check of server-side resources used by eCommerce Keep The Change
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4241.41 ▲0.43
Dashboard /wp-admin3.75 ▲0.4057.20 ▼4.13
Posts /wp-admin/edit.php3.80 ▲0.4450.32 ▲5.82
Add New Post /wp-admin/post-new.php6.26 ▲0.3883.11 ▼6.90
Media Library /wp-admin/upload.php3.61 ▲0.3837.51 ▲2.31
Woo KTC /wp-admin/options-general.php?page=wktc_welcome3.5836.20
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.6735.35

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

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

Browser metrics Passed 4 tests

eCommerce Keep The Change: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11414.85 ▲0.252.25 ▲0.3141.45 ▲3.49
Dashboard /wp-admin2,241 ▲534.87 ▼1.03104.51 ▲0.5043.30 ▼0.33
Posts /wp-admin/edit.php2,132 ▲462.05 ▲0.0536.61 ▲1.0139.74 ▲6.48
Add New Post /wp-admin/post-new.php1,561 ▲4223.35 ▲0.09695.34 ▼1.2264.36 ▲13.06
Media Library /wp-admin/upload.php1,431 ▲434.24 ▲0.0598.89 ▼1.7347.78 ▲2.66
Woo KTC /wp-admin/options-general.php?page=wktc_welcome8862.2028.6456.26
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9682.0927.6931.88

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-keep-the-change/assets/tgmpa/wktc-tgmpa.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woocommerce, ecommerce keep the change, woo round off, woocommerce add fee, woo...

woo-keep-the-change/woo-keep-the-change.php 92% from 13 tests

The entry point to "eCommerce Keep The Change" version 2.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Success! There were no dangerous files found in this plugin2,232 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP96161,9092,148
Markdown235072
JSON10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity42.75
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods103
▷ Static methods54.85%
▷ Public methods8077.67%
▷ Protected methods2322.33%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/welcome/img/wooktc-enabled.png38.06KB11.06KB▼ 70.94%
assets/admin/welcome/img/wooktc-disabled.png20.24KB8.29KB▼ 59.02%
assets/admin/welcome/img/logo.png7.29KB4.02KB▼ 44.82%