83% wc-products-pack

Code Review | Woocommerce products bundles

WordPress plugin Woocommerce products bundles scored83%from 54 tests.

About plugin

  • Plugin page: wc-products-pack
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.5.0
  • WordPress version: 6.3.1
  • First release: May 4, 2016
  • Latest release: Dec 4, 2016
  • Number of updates: 15
  • Update frequency: every 14.3 days
  • Top authors: pco_58 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,709 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.90ms] Passed 4 tests

A check of server-side resources used by Woocommerce products bundles
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0438.64 ▼3.12
Dashboard /wp-admin3.34 ▲0.0445.12 ▼4.52
Posts /wp-admin/edit.php3.39 ▲0.0346.10 ▼5.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.69 ▼14.63
Media Library /wp-admin/upload.php3.26 ▲0.0334.22 ▼0.56

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce products bundles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.67 ▼0.711.74 ▼0.1438.99 ▼0.31
Dashboard /wp-admin2,209 ▲215.86 ▲0.9798.58 ▼7.1338.20 ▼6.80
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0535.48 ▼5.5632.61 ▼1.55
Add New Post /wp-admin/post-new.php1,546 ▲1218.08 ▼5.42603.69 ▼68.6266.72 ▲16.39
Media Library /wp-admin/upload.php1,382 ▼04.13 ▼0.1793.44 ▼6.0543.23 ▼3.77

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Product' not found in wp-content/plugins/wc-products-pack/trunk/includes/class-wc-pack.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Product' not found in wp-content/plugins/wc-products-pack/includes/class-wc-pack.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wc-products-pack === )
Please take inspiration from this readme.txt

wc-products-pack/wc_product_pack.php 69% from 13 tests

The main PHP script in "Woocommerce products bundles" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-products-pack.php" instead of "wc_product_pack.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
There were no executable files found in this plugin244 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23425244

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin