68% stylish-cost-calculator

Code Review | Stylish Cost Calculator - Quote Generator, Lead Gen & Price Estimator

WordPress plugin Stylish Cost Calculator - Quote Generator, Lead Gen & Price Estimator scored68%from 54 tests.

About plugin

  • Plugin page: stylish-cost-calc...
  • Plugin version: 7.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 293
  • Update frequency: every 6.4 days
  • Top authors: designful (100%)

Code review

54 tests

User reviews

145 reviews

Install metrics

2,000+ active /146,166 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.82MB] [CPU: ▲0.52ms] 75% from 4 tests

Analyzing server-side resources used by Stylish Cost Calculator - Quote Generator, Lead Gen & Price Estimator
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,300.88ms on /wp-admin/admin.php?page=scc-diagnostics)
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8245.01 ▲6.14
Dashboard /wp-admin4.17 ▲0.8255.58 ▼9.84
Posts /wp-admin/edit.php4.22 ▲0.8651.90 ▲7.52
Add New Post /wp-admin/post-new.php6.78 ▲0.8991.25 ▼1.72
Media Library /wp-admin/upload.php4.03 ▲0.7941.62 ▲7.88
Members Portal /wp-admin/admin.php?page=scc-license-help4.4236.61
/wp-admin/admin.php?page=scc-coupons-management4.4535.77
Diag & Sys Info /wp-admin/admin.php?page=scc-diagnostics5.051,300.88
Help & Tutorials /wp-admin/admin.php?page=scc-help4.4238.47
All Calculator Forms /wp-admin/admin.php?page=scc_edit_items4.5034.72
Add New /wp-admin/admin.php?page=scc-tabs4.4241.19
/wp-admin/admin.php?page=scc-quote-management-screen4.4338.30
Global Settings /wp-admin/admin.php?page=scc-global-settings4.7147.07
Migrate /wp-admin/admin.php?page=Stylish_Cost_Calculator_Migration4.4236.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 333 new files
Database: 8 new tables, 22 new options
New tables
wp_df_scc_quote_submissions
wp_df_scc_sections
wp_df_scc_conditions
wp_df_scc_coupons
wp_df_scc_forms
wp_df_scc_subsections
wp_df_scc_elementitems
wp_df_scc_elements
New WordPress options
df_scc_notifications
widget_recent-posts
df_scc_currency
df_scc_fontsettings
theysaidso_admin_options
df_scc_licensed
scc_v7_tables_ready
df_scc_currency_coversion_mode
df_scc_emailsender
df_scc_sendername
...

Browser metrics Passed 4 tests

An overview of browser requirements for Stylish Cost Calculator - Quote Generator, Lead Gen & Price Estimator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲16813.46 ▼0.898.16 ▲6.4241.32 ▼1.82
Dashboard /wp-admin2,253 ▲795.56 ▼0.1194.31 ▼5.7267.33 ▲25.28
Posts /wp-admin/edit.php2,137 ▲401.99 ▲0.0135.12 ▼1.8533.99 ▼1.29
Add New Post /wp-admin/post-new.php6,245 ▲4,71919.10 ▼3.83987.14 ▲307.3657.19 ▲7.04
Media Library /wp-admin/upload.php1,455 ▲554.19 ▲0.0296.24 ▼7.6275.08 ▲29.96
Members Portal /wp-admin/admin.php?page=scc-license-help1,6562.4038.71127.23
/wp-admin/admin.php?page=scc-coupons-management1,6922.7142.2599.16
Diag & Sys Info /wp-admin/admin.php?page=scc-diagnostics1,6072.3931.5849.35
Help & Tutorials /wp-admin/admin.php?page=scc-help1,5062.5131.1240.57
All Calculator Forms /wp-admin/admin.php?page=scc_edit_items1,4422.4231.2952.92
Add New /wp-admin/admin.php?page=scc-tabs1,8832.6033.8744.33
/wp-admin/admin.php?page=scc-quote-management-screen1,3992.6833.6452.00
Global Settings /wp-admin/admin.php?page=scc-global-settings5,0578.10156.72154.64
Migrate /wp-admin/admin.php?page=Stylish_Cost_Calculator_Migration1,4912.4030.1067.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 8 tables in the database
    • wp_df_scc_coupons
    • wp_df_scc_subsections
    • wp_df_scc_quote_submissions
    • wp_df_scc_sections
    • wp_df_scc_elementitems
    • wp_df_scc_conditions
    • wp_df_scc_forms
    • wp_df_scc_elements
  • Zombie WordPress options were found after uninstall: 22 options
    • df_scc_emailsender
    • df_scc_currency_style
    • df_scc_post_activation_no_setup_redirect
    • df_scc_currency_coversion_manual_selection
    • widget_recent-comments
    • df_scc_messageform
    • df_scc_currency_coversion_mode
    • df_scc_emailsubject
    • scc_v7_tables_ready
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=scc-coupons-management
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 50% from 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 following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stylish-cost-calculator/lib/wp-google-fonts/google-fonts.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/stylish-cost-calculator/elementor-widgets/class-scc-elementor-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylish-cost-calculator/admin/views/partials/notificationBox.php:2

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: lead generation, form, woocommerce, free, sales funnel builder

stylish-cost-calculator/stylish-cost-calculator.php 92% from 13 tests

Analyzing the main PHP file in "Stylish Cost Calculator - Quote Generator, Lead Gen & Price Estimator" version 7.6.0
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin84,741 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
PHP601,2921,58229,862
JSON241021,365
CSS123,97266519,043
JavaScript151,0531,63011,174
SVG6002,763
PO File5200504471
XML1152063

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity32.02
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods319
▷ Static methods92.82%
▷ Public methods27285.27%
▷ Protected methods92.82%
▷ Private methods3811.91%
Functions32
▷ Named functions1134.38%
▷ Anonymous functions2165.62%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.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
176 PNG files occupy 6.69MB with 2.75MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/two2.png4.57KB2.50KB▼ 45.15%
assets/images/tooltip-images/for-settings/infographic-feat-currency-format.png30.16KB14.47KB▼ 52.01%
assets/email-images/filter_list.png0.16KB0.14KB▼ 13.17%
assets/images/tooltip-images/for-elements/infographic-element-upload.png26.64KB13.79KB▼ 48.25%
assets/images/tooltip-images/for-ad-settings/infographic-ad-total-calculation.png7.37KB3.90KB▼ 47.10%