78% steptotal

Code Review | Step by step Calculator

WordPress plugin Step by step Calculator scored78%from 54 tests.

About plugin

  • Plugin page: steptotal
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2023
  • Latest release: Mar 22, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mrtattobu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼20.92ms] Passed 4 tests

Analyzing server-side resources used by Step by step Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.35 ▼4.02
Dashboard /wp-admin3.40 ▲0.0642.75 ▼19.14
Posts /wp-admin/edit.php3.45 ▲0.1042.91 ▲0.11
Add New Post /wp-admin/post-new.php3.18 ▼2.7034.45 ▼60.64
Media Library /wp-admin/upload.php3.33 ▲0.1035.36 ▲4.63
Add new /wp-admin/post-new.php?post_type=steptotal3.1838.62
All Select /wp-admin/edit.php?post_type=selecttotal3.3738.29
All options /wp-admin/edit.php?post_type=optiontotal3.3734.59
Add new Option /wp-admin/post-new.php?post_type=optiontotal3.1834.15
All steps /wp-admin/edit.php?post_type=stepstotal3.3733.18
All steps /wp-admin/edit.php?post_type=steptotal3.3735.73
Add new Select /wp-admin/post-new.php?post_type=selecttotal3.1830.61
Add new step /wp-admin/post-new.php?post_type=stepstotal3.1832.03
All Invoices for Calculators /wp-admin/edit.php?post_type=invoicetotal3.3733.10
Add new /wp-admin/post-new.php?post_type=invoicetotal3.1830.86

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Step by step Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20613.32 ▼1.071.66 ▼0.1941.24 ▼3.63
Dashboard /wp-admin2,344 ▲1534.89 ▲0.02105.50 ▼11.3241.46 ▼5.88
Posts /wp-admin/edit.php2,224 ▲1382.05 ▲0.0135.85 ▼2.7034.35 ▼0.52
Add New Post /wp-admin/post-new.php1,629 ▲11517.67 ▲0.16642.80 ▼36.2862.83 ▲11.24
Media Library /wp-admin/upload.php1,523 ▲1384.23 ▲0.0197.68 ▼2.1443.98 ▼5.76
Add new /wp-admin/post-new.php?post_type=steptotal2,7827.78177.6072.23
All Select /wp-admin/edit.php?post_type=selecttotal1,2391.9531.4432.34
All options /wp-admin/edit.php?post_type=optiontotal1,2391.9431.8031.30
Add new Option /wp-admin/post-new.php?post_type=optiontotal2,8107.76174.6765.14
All steps /wp-admin/edit.php?post_type=stepstotal1,2392.0131.1828.67
All steps /wp-admin/edit.php?post_type=steptotal1,2391.9830.9830.94
Add new Select /wp-admin/post-new.php?post_type=selecttotal2,8087.90167.3061.13
Add new step /wp-admin/post-new.php?post_type=stepstotal2,7987.75172.0461.30
All Invoices for Calculators /wp-admin/edit.php?post_type=invoicetotal1,2391.9331.5430.81
Add new /wp-admin/post-new.php?post_type=invoicetotal2,7927.83164.9267.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=invoicetotal
    • > Notice in wp-content/plugins/steptotal/index.php+701
    Undefined index: extra_fields_nonce

SRP 50% from 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 following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/steptotal/index.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: calculator, product, service, commerce

steptotal/index.php 92% from 13 tests

The principal PHP file in "Step by step Calculator" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("steptotal.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,537 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP283801,107
CSS15911272
PO File17072158

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2596.15%
▷ Anonymous functions13.85%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin