74% wc-remove-bg

Code Review | Remove products background for WooCommerce

WordPress plugin Remove products background for WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: wc-remove-bg
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 26, 2019
  • Latest release: Feb 16, 2020
  • Number of updates: 12
  • Update frequency: every 11.8 days
  • Top authors: avs2738 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /7,159 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.39ms] Passed 4 tests

Analyzing server-side resources used by Remove products background for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2342.65 ▼2.54
Dashboard /wp-admin3.42 ▲0.1235.54 ▼10.67
Posts /wp-admin/edit.php3.49 ▲0.1340.32 ▼11.56
Add New Post /wp-admin/post-new.php5.67 ▼0.2286.38 ▼12.77
Media Library /wp-admin/upload.php3.43 ▲0.2035.96 ▼0.66

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: 2 new tables, 9 new options
New tables
wp_wc_remove_bg_backup
wp_wc_remove_bg
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
RemoveBG_gallery
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
RemoveBG_thumbnail
RemoveBG_Preserve_Resize

Browser metrics Passed 4 tests

An overview of browser requirements for Remove products background for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.39 ▼0.231.69 ▼0.2240.10 ▼11.54
Dashboard /wp-admin2,235 ▲585.84 ▲0.2091.85 ▲0.1439.80 ▲0.12
Posts /wp-admin/edit.php2,139 ▲392.26 ▲0.2743.04 ▲8.8338.86 ▼2.01
Add New Post /wp-admin/post-new.php1,555 ▲2623.67 ▲0.44667.14 ▲58.2837.14 ▼11.64
Media Library /wp-admin/upload.php1,434 ▲344.41 ▲0.18102.06 ▼8.4639.84 ▼1.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_wc_remove_bg_backup
    • wp_wc_remove_bg
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • theysaidso_admin_options
    • RemoveBG_gallery
    • widget_recent-posts
    • RemoveBG_Preserve_Resize
    • RemoveBG_thumbnail
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wc-remove-bg/admin/partials/plugin-wc-remove-bg-display-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-remove-bg/admin/partials/plugin-wc-remove-bg-display-admin-notices.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, change background, remove background, background, product images

wc-remove-bg/wc-remove-bg.php 92% from 13 tests

"Remove products background for WooCommerce" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.2" instead of "4.1")

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
There were no executable files found in this plugin1,910 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP101883971,377
JavaScript1288417
CSS171116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity30.60
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods2559.52%
▷ Protected methods1330.95%
▷ Private methods49.52%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected