89% wpc-composite-products

Code Review | WPC Composite Products for WooCommerce

WordPress plugin WPC Composite Products for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wpc-composite-pro...
  • Plugin version: 7.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Nov 10, 2023
  • Number of updates: 178
  • Update frequency: every 9.5 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

65 reviews

Install metrics

8,000+ active /357,961 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.17ms] Passed 4 tests

A check of server-side resources used by WPC Composite Products for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.20 ▼3.49
Dashboard /wp-admin3.38 ▲0.0746.04 ▼6.79
Posts /wp-admin/edit.php3.49 ▲0.1349.24 ▲0.40
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.85 ▼2.80
Media Library /wp-admin/upload.php3.30 ▲0.0737.28 ▲3.15
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.2728.49
About /wp-admin/admin.php?page=wpclever3.2729.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WPC Composite Products for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10514.67 ▲0.391.60 ▼0.0340.51 ▼2.85
Dashboard /wp-admin2,269 ▲895.55 ▼0.1189.09 ▼6.6570.18 ▲22.70
Posts /wp-admin/edit.php2,181 ▲812.01 ▲0.0738.92 ▼4.2334.23 ▼2.65
Add New Post /wp-admin/post-new.php1,762 ▲22724.68 ▲6.27674.54 ▲75.4351.04 ▼15.32
Media Library /wp-admin/upload.php1,477 ▲804.16 ▲0.02112.08 ▲7.6646.14 ▲0.87
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7412.1633.0155.61
About /wp-admin/admin.php?page=wpclever1,3782.1535.5035.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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)
Everything seems fine, however 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

wpc-composite-products/wpc-composite-products.php Passed 13 tests

The main file in "WPC Composite Products for WooCommerce" v. 7.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
WPC Composite Products provide a powerful kit-building solution for WooCommerce store.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected9,335 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP75761253,444
PO File89851,0932,391
CSS53641561,797
JavaScript5218471,177
Sass1970494
SVG20032

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity138.80
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity7.32
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods109
▷ Static methods98.26%
▷ Public methods109100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin