79% offermative-discount-pricing-related-products-upsell-funnels-for-woocommerce

Code Review | Offermative - Automated discount, related products recommendations, upsells for WooCommerce

WordPress plugin Offermative - Automated discount, related products recommendations, upsells for WooCommerce scored 79% from 54 tests.

About plugin

  • Plugin page: offermative-disco...
  • Plugin version: 5.0.0
  • PHP compatiblity: 5.6++
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.0
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Nov 11, 2022
  • Number of updates: 30
  • Update frequency: every 24.3 days
  • Top authors: storeapps (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 3,879 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.86ms] Passed 4 tests

A check of server-side resources used by Offermative - Automated discount, related products recommendations, upsells for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.72 ▼7.29
Dashboard /wp-admin3.36 ▲0.0645.04 ▼7.50
Posts /wp-admin/edit.php3.48 ▲0.1244.89 ▲0.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.49 ▼6.60
Media Library /wp-admin/upload.php3.28 ▲0.0633.89 ▼2.06

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 105 new files
Database: 5 new tables, 7 new options
New tables
wp_om_campaigns
wp_om_tracking_orders
wp_om_exclude_products_temp
wp_om_tracking_general
wp_om_fbt_temp
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
sa_om_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Offermative - Automated discount, related products recommendations, upsells for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5713.19 ▼1.421.76 ▼0.4943.56 ▼3.30
Dashboard /wp-admin2,217 ▲265.83 ▲0.9595.46 ▼19.5644.66 ▼3.13
Posts /wp-admin/edit.php2,113 ▲242.04 ▼0.0135.29 ▼0.6235.06 ▲2.08
Add New Post /wp-admin/post-new.php1,376 ▼15720.95 ▼2.29583.43 ▼79.6350.42 ▼10.91
Media Library /wp-admin/upload.php1,402 ▲174.22 ▲0.0496.16 ▼6.2044.18 ▲0.13

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_om_tracking_general
    • wp_om_fbt_temp
    • wp_om_exclude_products_temp
    • wp_om_tracking_orders
    • wp_om_campaigns
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • sa_om_db_version
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% 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
6 plugin tags: upsells, salesfunnels, woocommerce, marketingautomation, relatedproducts...

offermative-discount-pricing-related-products-upsell-funnels-for-woocommerce/offermative.php 62% from 13 tests

The primary PHP file in "Offermative - Automated discount, related products recommendations, upsells for WooCommerce" version 5.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 79 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.9.0" instead of "5.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("offermative-discount-pricing-related-products-upsell-funnels-for-woocommerce.php" instead of "offermative.php")
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "5.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
Everything looks great! No dangerous files found in this plugin5,367 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP128871,0794,750
JavaScript84830443
CSS500121
SVG530053

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity82.00
▷ Minimum class complexity5.00
▷ Maximum class complexity248.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods128
▷ Static methods2721.09%
▷ Public methods11992.97%
▷ Protected methods00.00%
▷ Private methods97.03%
Functions23
▷ Named functions1147.83%
▷ Anonymous functions1252.17%
Constants6
▷ Global constants6100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/admin/zebra-datepicker/icons.png0.48KB0.50KB0.00%