83% atum-stock-manager-for-woocommerce

Code Review | ATUM WooCommerce Inventory Management and Stock Tracking

WordPress plugin ATUM WooCommerce Inventory Management and Stock Tracking scored83%from 54 tests.

About plugin

  • Plugin page: atum-stock-manage...
  • Plugin version: 1.9.35
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2017
  • Latest release: Nov 27, 2023
  • Number of updates: 761
  • Update frequency: every 3.3 days
  • Top authors: salvamb (92.51%)agimeno82 (3.94%)japiera (3.15%)

Code review

54 tests

User reviews

119 reviews

Install metrics

10,000+ active /835,466 total downloads

Benchmarks

Plugin footprint 82% 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.83MB] [CPU: ▲3.24ms] Passed 4 tests

An overview of server-side resources used by ATUM WooCommerce Inventory Management and Stock Tracking
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8542.30 ▲2.26
Dashboard /wp-admin4.14 ▲0.8453.63 ▲3.34
Posts /wp-admin/edit.php4.19 ▲0.8348.72 ▲2.38
Add New Post /wp-admin/post-new.php6.72 ▲0.8397.21 ▲4.99
Media Library /wp-admin/upload.php4.06 ▲0.8339.33 ▲6.89

Server storage [IO: ▲32.30MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • The filesystem usage should be lower than 25MB (currently using 32.30MB)
Filesystem: 1,227 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for ATUM WooCommerce Inventory Management and Stock Tracking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.57 ▲0.302.21 ▲0.5842.13 ▼3.86
Dashboard /wp-admin2,207 ▲305.52 ▼0.0984.96 ▼13.5238.75 ▼8.66
Posts /wp-admin/edit.php2,116 ▲132.00 ▲0.0438.64 ▼3.6334.19 ▼2.60
Add New Post /wp-admin/post-new.php1,538 ▲1123.13 ▼0.04646.91 ▲18.4557.48 ▲5.24
Media Library /wp-admin/upload.php1,409 ▲94.23 ▲0.0298.12 ▼9.5043.54 ▲0.00

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

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
  • 280× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/Em.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Image/ImageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/Code.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/InlineTag.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/TextCircle.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/H2.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/madcoda/php-youtube-api/src/YoutubeServiceProviderLaravel5.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/psr-http-message-shim/src/Stream.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Tag/Strike.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/setasign/fpdi/src/FpdfTpl.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt might help

atum-stock-manager-for-woocommerce/atum-stock-manager-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "ATUM WooCommerce Inventory Management and Stock Tracking" version 1.9.35
68 characters long description:
The ultimate stock management plugin for serious WooCommerce sellers

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected173,894 lines of code in 1,021 files:
LanguageFilesBlank linesComment linesLines of code
PHP67225,80632,943113,432
JSON220019,804
Sass1233,63787916,790
JavaScript322,3181,01310,651
TypeScript833,5662,3268,142
Markdown2266601,912
CSS282842121,749
SVG1423802
YAML15926343
XML73637218
Twig214048
Bourne Shell1203

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 7,027)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity45.07
▷ Minimum class complexity1.00
▷ Maximum class complexity7,027.00
Average method complexity7.86
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces97
Interfaces26
Traits15
Classes477
▷ Abstract classes255.24%
▷ Concrete classes45294.76%
▷ Final classes245.31%
Methods3,392
▷ Static methods45013.27%
▷ Public methods2,87684.79%
▷ Protected methods2497.34%
▷ Private methods2677.87%
Functions68
▷ Named functions68.82%
▷ Anonymous functions6291.18%
Constants532
▷ Global constants163.01%
▷ Class constants51696.99%
▷ Public constants516100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 1.22MB with 0.77MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dashboard/card-subscription-bg.png8.83KB3.65KB▼ 58.60%
assets/images/dashboard/widget-thumb-orders.png14.00KB6.35KB▼ 54.67%
assets/images/dashboard/widget-thumb-promo-sales.png13.19KB6.35KB▼ 51.84%
assets/images/settings/hc-mode.png246.22KB74.37KB▼ 69.79%
assets/images/dashboard/card-add-ons-bg.png25.07KB4.71KB▼ 81.20%