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

Code Review | Smart Features for WooCommerce

WordPress plugin Smart Features for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: all-in-one-smart-...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Sep 4, 2020
  • Latest release: Oct 7, 2020
  • Number of updates: 11
  • Update frequency: every 3.1 days
  • Top authors: alex602 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 202 total downloads

Benchmarks

Plugin footprint 58% 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+303
    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.06MB] [CPU: ▼137.67ms] 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 /2.80 ▲0.0829.95 ▲9.28
Dashboard /wp-admin3.12 ▲0.0755.17 ▲3.58
Posts /wp-admin/edit.php3.17 ▲0.0754.09 ▲3.42
Add New Post /wp-admin/post-new.php5.48 ▲0.05105.48 ▼557.40
Media Library /wp-admin/upload.php3.06 ▲0.0637.72 ▼0.28
Tracking Code Fields /wp-admin/admin.php?page=smart-tracking3.0135.75
Trustable Images /wp-admin/admin.php?page=smart-trust-image3.0130.64
Custom Css /wp-admin/admin.php?page=custom-css3.0134.15

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, no new options

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 /3,920 ▲32422.31 ▲6.7033.84 ▲19.7049.24 ▼5.12
Dashboard /wp-admin3,014 ▲808.06 ▲2.07197.35 ▲11.37144.58 ▲22.46
Posts /wp-admin/edit.php2,811 ▲724.91 ▲2.20100.39 ▲23.79110.72 ▲15.58
Add New Post /wp-admin/post-new.php1,662 ▲4720.21 ▼1.18344.81 ▲1.93112.61 ▼0.78
Media Library /wp-admin/upload.php1,806 ▼16.68 ▲1.66159.02 ▼1.32147.67 ▲31.45
Tracking Code Fields /wp-admin/admin.php?page=smart-tracking1,3994.65101.03118.72
Trustable Images /wp-admin/admin.php?page=smart-trust-image1,1214.2076.3487.16
Custom Css /wp-admin/admin.php?page=custom-css1,2424.51111.92100.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'add_main_menu_page' not found or invalid function name

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=custom-css
    • > Notice in wp-content/plugins/all-in-one-smart-features-woocommerce/includes/custom-css.php+62
    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.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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")
  • Domain Path: The domain path folder was not found ("/translations/")
  • 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

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 detected347 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP514732234
JavaScript15065
CSS25148

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/plugin-icon.png0.80KB0.92KB0.00%
uploads/trustimage2.png26.24KB23.45KB▼ 10.62%
uploads/trustimage1.png14.21KB14.09KB▼ 0.85%