83% human-bmi-calculator

Code Review | Human BMI Calculator

WordPress plugin Human BMI Calculator scored83%from 54 tests.

About plugin

  • Plugin page: human-bmi-calculator
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: tareqemon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /34 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.18ms] Passed 4 tests

Server-side resources used by Human BMI Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.59 ▲4.83
Dashboard /wp-admin3.32 ▼0.0349.67 ▼11.52
Posts /wp-admin/edit.php3.37 ▲0.0150.46 ▼0.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.78 ▼21.63
Media Library /wp-admin/upload.php3.24 ▲0.0133.45 ▼3.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Human BMI Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14213.41 ▼1.308.17 ▲6.2742.41 ▲0.25
Dashboard /wp-admin2,211 ▲315.60 ▲0.0295.61 ▼0.2542.91 ▲1.23
Posts /wp-admin/edit.php2,116 ▲132.01 ▲0.0540.48 ▼3.1436.96 ▲0.54
Add New Post /wp-admin/post-new.php1,539 ▲823.01 ▼0.29592.79 ▼62.4150.23 ▼6.00
Media Library /wp-admin/upload.php1,419 ▲224.14 ▼0.0799.25 ▲1.4644.27 ▲3.74

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/human-bmi-calculator/bmi-view.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #2 (Backend Setting Page) image required
The official readme.txt is a good inspiration

human-bmi-calculator/human-bmi-calculator.php 85% from 13 tests

The entry point to "Human BMI Calculator" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "6.0")

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
Good job! No executable or dangerous file extensions detected179 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2161883
CSS12048
JavaScript115048

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Constants0
▷ Global constants00.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