90% woo-product-fee

Code Review | Product Fee for Woocommerce

WordPress plugin Product Fee for Woocommerce scored 90% from 54 tests.

About plugin

  • Plugin page: woo-product-fee
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: Jan 10, 2020
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: quanticedge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Product Fee for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.54 ▼5.98
Dashboard /wp-admin3.31 ▲0.0045.99 ▼1.39
Posts /wp-admin/edit.php3.36 ▲0.0050.09 ▲4.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.44 ▲9.97
Media Library /wp-admin/upload.php3.23 ▲0.0037.24 ▲3.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Product Fee for Woocommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼1.151.85 ▲0.1738.64 ▼3.40
Dashboard /wp-admin2,206 ▲515.84 ▲0.2197.79 ▲4.9437.68 ▲1.02
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0438.65 ▲4.9035.27 ▼0.69
Add New Post /wp-admin/post-new.php1,533 ▼023.28 ▼0.16633.50 ▼55.6950.30 ▼4.34
Media Library /wp-admin/upload.php1,388 ▲94.17 ▼0.03102.66 ▲2.5245.05 ▼1.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: custom fee, woocommerce product fee, additional fee

woo-product-fee/woo-product-fee.php 92% from 13 tests

Analyzing the main PHP file in "Product Fee for Woocommerce" version 1.0
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22446106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
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
No PNG images were found in this plugin