77% bmic-calculator

Code Review | BMI Calculator

WordPress plugin BMI Calculator scored77%from 54 tests.

About plugin

  • Plugin page: bmic-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 2, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 5
  • Update frequency: every 44.4 days
  • Top authors: mgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.02ms] Passed 4 tests

A check of server-side resources used by BMI Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.73 ▼9.43
Dashboard /wp-admin3.35 ▲0.0449.78 ▲1.64
Posts /wp-admin/edit.php3.40 ▲0.0449.89 ▼8.48
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.05 ▲2.61
Media Library /wp-admin/upload.php3.27 ▲0.0439.38 ▲0.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

BMI Calculator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.59 ▼0.798.69 ▲6.8539.74 ▼6.35
Dashboard /wp-admin2,233 ▲565.87 ▲0.23100.83 ▲7.0342.28 ▼1.75
Posts /wp-admin/edit.php2,140 ▲402.50 ▲0.4838.92 ▼2.5633.66 ▼5.84
Add New Post /wp-admin/post-new.php1,554 ▲1923.68 ▲5.30658.94 ▲26.5636.81 ▼34.17
Media Library /wp-admin/upload.php1,438 ▲384.48 ▲0.30106.39 ▲1.7741.15 ▼1.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bmic-calculator/bmi-calculator-main.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bmic-calculator/main/frontend/bmic-frontend.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bmic-calculator/admin/bmic-backend.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
  • Screenshots: These screenshots need descriptions #1, #2, #3 in bmic-calculator/assets to your readme.txt
Please take inspiration from this readme.txt

bmic-calculator/bmi-calculator-main.php 85% from 13 tests

The principal PHP file in "BMI Calculator" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("bmic-calculator.php" instead of "bmi-calculator-main.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
No dangerous file extensions were detected742 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript368173439
PHP3117193
CSS2149110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin