84% stock-tracking-reporting-for-woocommerce

Code Review | Stock Tracking & Reporting for Woocommerce

WordPress plugin Stock Tracking & Reporting for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: stock-tracking-re...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Feb 18, 2021
  • Latest release: Mar 12, 2021
  • Number of updates: 13
  • Update frequency: every 2.5 days
  • Top authors: innocow (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) | 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.02MB] [CPU: ▼9.36ms] Passed 4 tests

An overview of server-side resources used by Stock Tracking & Reporting for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.41 ▲1.99
Dashboard /wp-admin3.33 ▼0.0147.28 ▼15.02
Posts /wp-admin/edit.php3.38 ▲0.0344.44 ▼3.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.47 ▼20.07
Media Library /wp-admin/upload.php3.25 ▲0.0334.39 ▲1.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Stock Tracking & Reporting for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.361.77 ▼0.2244.04 ▲0.63
Dashboard /wp-admin2,203 ▲154.85 ▼0.04111.55 ▲4.2143.19 ▼1.15
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0132.43 ▼2.5334.34 ▼1.06
Add New Post /wp-admin/post-new.php1,533 ▲523.22 ▲0.11592.97 ▼66.5752.02 ▼2.95
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0292.61 ▼4.4542.90 ▲0.23

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Models\\Transaction\\Mappers\\Transaction_Mapper_WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb_update.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Models\\Transaction\\Mappers\\Transaction_Mapper_WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb_create.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Models\\Transaction\\Mappers\\Transaction_Mapper_WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb_search.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Models\\Transaction\\Mappers\\Transaction_Mapper_WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb_read.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Models\\Transaction\\Mappers\\Transaction_Mapper_WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb_delete.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Stock_Records\\Storage\\WPDB' not found in wp-content/plugins/stock-tracking-reporting-for-woocommerce/src/models/transaction/mappers/transaction_mapper_wpdb.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: record, tracking, woocommerce, track, inventory...

stock-tracking-reporting-for-woocommerce/stock-tracking-reporting-for-woocommerce.php 92% from 13 tests

"Stock Tracking & Reporting for Woocommerce" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,112 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP372,2001,4704,369
JavaScript6508201,075
PO File1109169381
CSS38837287

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.69
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes35
▷ Abstract classes12.86%
▷ Concrete classes3497.14%
▷ Final classes00.00%
Methods241
▷ Static methods2811.62%
▷ Public methods21990.87%
▷ Protected methods10.41%
▷ Private methods218.71%
Functions38
▷ Named functions923.68%
▷ Anonymous functions2976.32%
Constants1
▷ Global constants1100.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