10% all-in-one-smart-features-woocommerce

Code Review | Smart Features for WooCommerce

WordPress plugin Smart Features for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: all-in-one-smart-...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Dec 24, 2021
  • Number of updates: 17
  • Update frequency: every 28.1 days
  • Top authors: alex602 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /511 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'add_main_menu_page' not found or invalid function name

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.76ms] Passed 4 tests

This is a short check of server-side resources used by Smart Features for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0626.17 ▼16.98
Dashboard /wp-admin3.34 ▼0.0143.93 ▼18.70
Posts /wp-admin/edit.php3.39 ▲0.0346.42 ▲2.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.73 ▼7.77
Media Library /wp-admin/upload.php3.26 ▲0.0337.26 ▲0.43
Trustable Images /wp-admin/admin.php?page=smart-trust-image3.2032.55
Custom Css /wp-admin/admin.php?page=custom-css3.2026.80
Tracking Code Fields /wp-admin/admin.php?page=smart-tracking3.2026.92

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Smart Features for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22619.45 ▲4.8215.21 ▲13.4836.01 ▼7.92
Dashboard /wp-admin2,243 ▲636.59 ▲0.93124.74 ▲35.4090.87 ▲52.31
Posts /wp-admin/edit.php2,128 ▲313.95 ▲1.9347.90 ▲11.6632.37 ▼1.06
Add New Post /wp-admin/post-new.php1,571 ▲4524.39 ▲1.22670.55 ▲21.3640.87 ▼12.19
Media Library /wp-admin/upload.php1,445 ▲425.65 ▲1.30102.29 ▲2.7487.73 ▲43.76
Trustable Images /wp-admin/admin.php?page=smart-trust-image8803.7337.6829.12
Custom Css /wp-admin/admin.php?page=custom-css9983.8050.1838.00
Tracking Code Fields /wp-admin/admin.php?page=smart-tracking1,1173.9153.1741.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'add_main_menu_page' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-tracking
    • > Notice in wp-content/plugins/all-in-one-smart-features-woocommerce/includes/smart-tracking.php+106
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP 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 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

all-in-one-smart-features-woocommerce/smart-woo.php 77% from 13 tests

"Smart Features for WooCommerce" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/translations/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("all-in-one-smart-features-woocommerce.php" instead of "smart-woo.php")

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
No dangerous file extensions were detected349 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP514732234
JavaScript15065
CSS26150

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
uploads/trustimage3.png114.05KB32.80KB▼ 71.24%
uploads/trustimage2.png26.24KB23.45KB▼ 10.62%
uploads/trustimage1.png14.21KB14.09KB▼ 0.85%
uploads/plugin-icon.png0.80KB0.92KB0.00%