72% smart-manager-for-wp-e-commerce

Code Review | Smart Manager – WooCommerce Advanced Bulk Edit, Inventory Management, Stock Manager, Duplicate, Export...

WordPress plugin Smart Manager – WooCommerce Advanced Bulk Edit, Inventory Management, Stock Manager, Duplicate, Export... scored72%from 54 tests.

About plugin

  • Plugin page: smart-manager-for...
  • Plugin version: 8.24.0
  • PHP compatiblity: 5.6++
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2011
  • Latest release: Dec 1, 2023
  • Number of updates: 624
  • Update frequency: every 7.5 days
  • Top authors: storeapps (58.81%)niravmehta (30.61%)ratnakar.dubey (10.9%)

Code review

54 tests

User reviews

259 reviews

Install metrics

10,000+ active /1,102,220 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.77MB] [CPU: ▲5.08ms] Passed 4 tests

This is a short check of server-side resources used by Smart Manager – WooCommerce Advanced Bulk Edit, Inventory Management, Stock Manager, Duplicate, Export...
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7045.15 ▲3.81
Dashboard /wp-admin4.11 ▲0.7655.60 ▼4.67
Posts /wp-admin/edit.php4.16 ▲0.8057.30 ▲12.13
Add New Post /wp-admin/post-new.php6.69 ▲0.80103.93 ▲9.05
Media Library /wp-admin/upload.php4.03 ▲0.8044.95 ▲12.28
StoreApps Plugins /wp-admin/admin.php?page=sm-storeapps-plugins3.9443.33
Smart Manager /wp-admin/admin.php?page=smart-manager4.1154.14
Docs & Support /wp-admin/admin.php?page=smart-manager&landing-page=sm-about4.09250.80
🔥 Go Pro /wp-admin/admin.php?page=smart-manager-pricing3.9248.70

Server storage [IO: ▲3.83MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 82 new files
Database: 3 new tables, 8 new options
New tables
wp_sm_task_details
wp_sm_tasks
wp_sm_advanced_search_temp
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
_sm_update_418_date
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
sm_lite_activation_date

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Manager – WooCommerce Advanced Bulk Edit, Inventory Management, Stock Manager, Duplicate, Export...
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10014.67 ▼0.041.71 ▼0.0536.76 ▼7.38
Dashboard /wp-admin2,284 ▲1045.56 ▼0.0697.68 ▼4.2647.69 ▲7.85
Posts /wp-admin/edit.php2,191 ▲912.04 ▲0.0341.02 ▼0.0142.71 ▲5.82
Add New Post /wp-admin/post-new.php1,563 ▲2823.30 ▲0.07636.28 ▼39.4859.05 ▼6.99
Media Library /wp-admin/upload.php1,465 ▲654.27 ▲0.1198.98 ▲2.9847.86 ▲4.50
StoreApps Plugins /wp-admin/admin.php?page=sm-storeapps-plugins9331.6323.9065.92
Smart Manager /wp-admin/admin.php?page=smart-manager1,8847.64377.47104.54
Docs & Support /wp-admin/admin.php?page=smart-manager&landing-page=sm-about5,08353.201,496.8485.11
🔥 Go Pro /wp-admin/admin.php?page=smart-manager-pricing8392.0235.9847.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_sm_task_details
    • wp_sm_tasks
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • _sm_update_418_date
    • sm_lite_activation_date
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-manager-pricing
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (39 tag instead of maximum 10)
You can look at the official readme.txt

smart-manager-for-wp-e-commerce/smart-manager.php 69% from 13 tests

The main PHP file in "Smart Manager – WooCommerce Advanced Bulk Edit, Inventory Management, Stock Manager, Duplicate, Export..." ver. 8.24.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Plugin Name: A shorter plugin name is better (currently 78 characters long instead of max. 70)
  • Description: Keep the plugin description shorter than 140 characters (currently 196 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("smart-manager-for-wp-e-commerce.php" instead of "smart-manager.php")
  • Requires PHP: Required version number should use periods and dots only (ex. "7.0" instead of "5.6+")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin26,051 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP172,3711,57810,529
PO File63,5584,0719,391
JavaScript147762914,202
CSS72733411,194
SVG101735

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,231)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 210)
Cyclomatic complexity
Average complexity per logical line of code0.83
Average class complexity233.93
▷ Minimum class complexity1.00
▷ Maximum class complexity1,231.00
Average method complexity13.52
▷ Minimum method complexity1.00
▷ Maximum method complexity210.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods241
▷ Static methods6225.73%
▷ Public methods23999.17%
▷ Protected methods00.00%
▷ Private methods20.83%
Functions45
▷ Named functions2248.89%
▷ Anonymous functions2351.11%
Constants84
▷ Global constants84100.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
27 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/jqgrid/save_img-white-16X16.png14.61KB0.11KB▼ 99.22%
assets/images/jqgrid/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
classes/sa-includes/images/bfcm-2023.png170.20KB74.75KB▼ 56.08%
assets/images/jqgrid/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/images/jqgrid/ui-bg_highlight-soft_25_E2EFF8_1x100.png0.31KB0.12KB▼ 60.31%