90% disable-analytics-for-woocommerce

Code Review | Debloat for WooCommerce

WordPress plugin Debloat for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: disable-analytics...
  • Plugin version: 0.8.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Nov 19, 2023
  • Number of updates: 41
  • Update frequency: every 30.6 days
  • Top authors: kgmservizi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,968 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.95ms] Passed 4 tests

A check of server-side resources used by Debloat for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.04 ▼2.06
Dashboard /wp-admin3.35 ▲0.0543.29 ▼2.85
Posts /wp-admin/edit.php3.47 ▲0.1145.75 ▼1.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.13 ▼5.00
Media Library /wp-admin/upload.php3.27 ▲0.0435.18 ▲3.45

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: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Debloat for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.67 ▲0.321.90 ▲0.1543.84 ▼0.47
Dashboard /wp-admin2,201 ▲215.60 ▲0.0791.14 ▼2.2242.11 ▲3.39
Posts /wp-admin/edit.php2,106 ▲61.96 ▲0.0143.02 ▲5.4336.67 ▼3.29
Add New Post /wp-admin/post-new.php1,529 ▲323.29 ▲0.03683.17 ▲90.5857.48 ▼2.98
Media Library /wp-admin/upload.php1,406 ▲94.19 ▼0.0497.36 ▼3.0043.12 ▼0.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: woocommerce, analytics, debloat woocommerce, woocommerce analytics, debloat...

disable-analytics-for-woocommerce/disable-analytics-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Debloat for WooCommerce" version 0.8.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin637 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP382177597
JavaScript16025
CSS10015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
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
There are no PNG files in this plugin