84% f4-total-stock-value-for-woocommerce

Code Review | F4 Total Stock Value for WooCommerce

WordPress plugin F4 Total Stock Value for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: f4-total-stock-va...
  • Plugin version: 2.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2019
  • Latest release: Oct 6, 2023
  • Number of updates: 32
  • Update frequency: every 45.3 days
  • Top authors: faktorvier (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /10,164 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.17ms] Passed 4 tests

Server-side resources used by F4 Total Stock Value for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.10 ▼0.87
Dashboard /wp-admin3.41 ▲0.0746.81 ▼11.08
Posts /wp-admin/edit.php3.53 ▲0.1747.08 ▼3.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1183.83 ▼5.43
Media Library /wp-admin/upload.php3.34 ▲0.1133.05 ▼0.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for F4 Total Stock Value for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.26 ▼0.271.69 ▲0.2348.40 ▲7.60
Dashboard /wp-admin2,195 ▲185.53 ▼0.1483.66 ▼5.7839.97 ▼8.33
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0633.27 ▼3.0535.28 ▲0.17
Add New Post /wp-admin/post-new.php1,536 ▲718.25 ▼4.86642.58 ▼33.6359.87 ▼7.75
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.1194.14 ▼2.0440.91 ▼3.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'F4\\WCTSV\\Core\\AbstractHooks' not found in wp-content/plugins/f4-total-stock-value-for-woocommerce/modules/Core/Hooks.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'F4\\WCTSV\\Core\\AbstractHooks' not found in wp-content/plugins/f4-total-stock-value-for-woocommerce/modules/Analytics/Hooks.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'F4\\WCTSV\\Analytics\\Helpers' not found in wp-content/plugins/f4-total-stock-value-for-woocommerce/modules/Analytics/views/report.php:7

User-side errors Passed 1 test

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

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
7 plugin tags: woocommerce, stock, stock value, cost of goods, shop...

f4-total-stock-value-for-woocommerce/f4-total-stock-value-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "F4 Total Stock Value for WooCommerce" version 2.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("5.3" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin809 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7166427656
CSS1299153

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.33
Average class complexity13.00
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods38
▷ Static methods38100.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants14
▷ Global constants14100.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
PNG images were not found in this plugin