79% calculator-builder

Code Review | Calculator Builder

WordPress plugin Calculator Builder scored79%from 54 tests.

About plugin

  • Plugin page: calculator-builder
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 19, 2021
  • Latest release: Nov 23, 2023
  • Number of updates: 36
  • Update frequency: every 23.9 days
  • Top authors: Wpcalc (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /15,964 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.01ms] Passed 4 tests

Server-side resources used by Calculator Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3542.56 ▲0.92
Dashboard /wp-admin3.66 ▲0.3549.88 ▼1.86
Posts /wp-admin/edit.php3.71 ▲0.3552.70 ▲3.84
Add New Post /wp-admin/post-new.php6.17 ▲0.2993.94 ▲0.29
Media Library /wp-admin/upload.php3.52 ▲0.2935.78 ▲0.62
All Calculators /wp-admin/admin.php?page=calchub3.4935.36

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 79 new files
Database: 1 new table, 7 new options
New tables
wp_calculator_builder
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
calculator_builder_data
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Calculator Builder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6314.20 ▼0.151.79 ▼0.0444.81 ▼0.94
Dashboard /wp-admin2,230 ▲535.58 ▼0.0292.52 ▼8.1042.41 ▼1.58
Posts /wp-admin/edit.php2,135 ▲351.98 ▼0.0340.38 ▲0.3735.72 ▲0.69
Add New Post /wp-admin/post-new.php1,554 ▼12523.28 ▲1.57602.25 ▼103.9855.76 ▲3.25
Media Library /wp-admin/upload.php1,435 ▲324.16 ▼0.0396.45 ▲0.4840.60 ▼1.01
All Calculators /wp-admin/admin.php?page=calchub1,0872.0227.0044.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_calculator_builder
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • calculator_builder_data
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Admin - calculators list), #2 (Admin - add fields to the calculator form), #3 (Admin - calculator builder live preview), #4 (Admin - add the formula for calculator), #5 (Frontend - calculator on frontend)
You can look at the official readme.txt

calculator-builder/calculator-builder.php 85% from 13 tests

Analyzing the main PHP file in "Calculator Builder" version 1.5.5
Please make the necessary changes and fix the following:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin22,106 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS103,7057017,027
PHP213476572,534
JavaScript6383272,048
Sass4800399
Markdown129082
SVG14016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.36
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods103
▷ Static methods10.97%
▷ Public methods6260.19%
▷ Protected methods21.94%
▷ Private methods3937.86%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants635.29%
▷ Class constants1164.71%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.55MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png74.55KB51.89KB▼ 30.39%
screenshot-5.png61.23KB32.97KB▼ 46.15%
assets/img/calchub-logo.png8.53KB9.98KB0.00%
screenshot-2.png108.30KB49.59KB▼ 54.21%
screenshot-1.png135.70KB71.02KB▼ 47.66%