78% body-mass-index-bmi-calculator

Code Review | Online BMI Calculator for Male & Female

WordPress plugin Online BMI Calculator for Male & Female scored78%from 54 tests.

About plugin

  • Plugin page: body-mass-index-b...
  • Plugin version: 1.0
  • PHP compatiblity: 4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8
  • WordPress version: 6.3.1
  • First release: May 29, 2018
  • Latest release: May 31, 2018
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: calculators (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Online BMI Calculator for Male & Female
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.00 ▼6.24
Dashboard /wp-admin3.31 ▲0.0045.08 ▼3.63
Posts /wp-admin/edit.php3.36 ▲0.0044.67 ▼4.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.25 ▼13.53
Media Library /wp-admin/upload.php3.23 ▲0.0035.40 ▲1.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Online BMI Calculator for Male & Female
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.041.64 ▼0.3943.50 ▼6.11
Dashboard /wp-admin2,195 ▲155.64 ▼0.0086.82 ▼10.8335.72 ▼7.20
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.1435.86 ▼1.4130.61 ▼7.36
Add New Post /wp-admin/post-new.php1,526 ▼223.65 ▲0.68681.70 ▲5.0371.34 ▲16.53
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0498.92 ▼6.0341.08 ▼4.60

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/body-mass-index-bmi-calculator/bmi-html.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/body-mass-index-bmi-calculator/bmi-calculator-male-female.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/body-mass-index-bmi-calculator/body-mass-index-bmi-calculator.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: body mass index, bmi calculator, bmi

body-mass-index-bmi-calculator/bmi-calculator-male-female.php 85% from 13 tests

The main file in "Online BMI Calculator for Male & Female" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("body-mass-index-bmi-calculator.php" instead of "bmi-calculator-male-female.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin28 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2242128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin