89% woocommerce-product-fees

Code Review | WooCommerce Product Fees

WordPress plugin WooCommerce Product Fees scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: May 29, 2018
  • Number of updates: 22
  • Update frequency: every 45.8 days
  • Top authors: iCaleb (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

3,000+ active /34,059 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.98ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Product Fees
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.03 ▼17.03
Dashboard /wp-admin3.31 ▲0.0150.52 ▼4.78
Posts /wp-admin/edit.php3.36 ▲0.0050.78 ▼5.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.43 ▼16.21
Media Library /wp-admin/upload.php3.23 ▲0.0037.14 ▼0.99

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product Fees
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.21 ▼0.151.75 ▼0.0938.35 ▼5.00
Dashboard /wp-admin2,195 ▲185.60 ▲0.0286.93 ▼2.5638.49 ▼1.14
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0239.59 ▲6.3734.80 ▼0.09
Add New Post /wp-admin/post-new.php1,528 ▲222.70 ▼0.86590.28 ▼96.5148.03 ▼4.45
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0296.96 ▼13.3544.51 ▼4.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #5 (Optional coupon setting.) image required
The official readme.txt might help

woocommerce-product-fees/woocommerce-product-fees.php 92% from 13 tests

The main PHP file in "WooCommerce Product Fees" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "4.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin362 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4111160362

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.00
▷ Minimum class complexity10.00
▷ Maximum class complexity26.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin