63% price-calculator-to-your-website

Code Review | Website price calculator

WordPress plugin Website price calculator scored63%from 54 tests.

About plugin

  • Plugin page: price-calculator-...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 12, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 12
  • Update frequency: every 117.8 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,065 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.53ms] Passed 4 tests

Server-side resources used by Website price calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1139.88 ▲2.50
Dashboard /wp-admin3.48 ▲0.1749.97 ▲0.27
Posts /wp-admin/edit.php3.53 ▲0.1749.79 ▲4.07
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.10 ▼5.35
Media Library /wp-admin/upload.php3.34 ▲0.1135.48 ▲0.45
Add new /wp-admin/admin.php?page=mxpctyw_create_new_calc3.3132.91
Link Name /wp-admin/admin.php?page=mxpctyw_edit_calc3.3333.82
Price Calculator /wp-admin/admin.php?page=mxpctyw-price-calculator-to-your-website-menu3.3131.83

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: 1 new table, 6 new options
New tables
wp_mxpctyw_calc_table
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Website price calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19713.76 ▼0.805.83 ▲4.2743.30 ▲5.07
Dashboard /wp-admin2,252 ▲756.00 ▲0.4394.14 ▲7.6039.00 ▲2.10
Posts /wp-admin/edit.php2,159 ▲592.32 ▲0.3139.56 ▲6.7833.90 ▼0.30
Add New Post /wp-admin/post-new.php1,582 ▲5418.56 ▼4.21650.40 ▼2.6346.81 ▼6.29
Media Library /wp-admin/upload.php1,460 ▲604.41 ▲0.1895.92 ▲1.3142.41 ▼3.23
Add new /wp-admin/admin.php?page=mxpctyw_create_new_calc1,2902.5139.4233.23
Link Name /wp-admin/admin.php?page=mxpctyw_edit_calc1,5442.7031.5130.08
Price Calculator /wp-admin/admin.php?page=mxpctyw-price-calculator-to-your-website-menu8792.0525.2921.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_mxpctyw_calc_table
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mxpctyw_create_new_calc
    • > Notice in wp-content/plugins/price-calculator-to-your-website/includes/admin/views/components/js_vars.php+11
    Undefined variable: calc_id
    • > GET request to /wp-admin/admin.php?page=mxpctyw_edit_calc
    • > Notice in wp-content/plugins/price-calculator-to-your-website/includes/admin/views/edit-calc.php+6
    Undefined index: calc

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/price-calculator-to-your-website/includes/admin/views/components/add_price_calc_for_js.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/price-calculator-to-your-website/includes/admin/views/components/js_vars.php:5

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: price calculator, website price calculator

price-calculator-to-your-website/price-calculator-to-your-website.php Passed 13 tests

The primary PHP file in "Website price calculator" version 4.1 is used by WordPress to initiate all plugin functionality
98 characters long description:
Price calculator for your site. You will be able to customize price calculators for your visitors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected39,523 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
SVG40035,435
CSS810242,484
PHP27618357930
HTML3120386
JavaScript325769255
PO File18833

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.61
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes15.88%
Methods50
▷ Static methods1530.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/img/default_icon.png19.02KB1.76KB▼ 90.74%