84% simple-bmi-form

Code Review | Simple BMI Form

WordPress plugin Simple BMI Form scored84%from 54 tests.

About plugin

  • Plugin page: simple-bmi-form
  • Plugin version: 1.0.12
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: Jul 21, 2023
  • Number of updates: 10
  • Update frequency: every 141.6 days
  • Top authors: lorro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.92ms] Passed 4 tests

This is a short check of server-side resources used by Simple BMI Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.00 ▼0.64
Dashboard /wp-admin3.42 ▲0.1146.88 ▲2.33
Posts /wp-admin/edit.php3.53 ▲0.1745.33 ▼4.50
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.21 ▼23.03
Media Library /wp-admin/upload.php3.34 ▲0.1135.76 ▲0.51
Simple BMI Form /wp-admin/options-general.php?page=simple-bmi-form3.3135.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 13 new options
New WordPress options
sbf_background_colour
sbf_border_width
widget_recent-comments
can_compress_scripts
sbf_border_colour
theysaidso_admin_options
widget_recent-posts
sbf_font_size
sbf_show_wiki_link
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple BMI Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.89 ▼0.425.36 ▲3.5643.55 ▼1.06
Dashboard /wp-admin2,229 ▲445.17 ▼0.64115.83 ▲16.2042.02 ▲0.66
Posts /wp-admin/edit.php2,114 ▲222.32 ▲0.2635.66 ▼4.5631.28 ▼5.05
Add New Post /wp-admin/post-new.php1,531 ▲1723.64 ▲6.12662.26 ▲58.9337.40 ▼18.30
Media Library /wp-admin/upload.php1,414 ▲264.40 ▲0.2197.61 ▲0.9144.47 ▼0.78
Simple BMI Form /wp-admin/options-general.php?page=simple-bmi-form1,1182.3250.5628.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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 13 options
    • sbf_background_colour
    • sbf_default_units
    • widget_theysaidso_widget
    • sbf_border_width
    • widget_simple_bmi_form
    • widget_recent-posts
    • sbf_border_colour
    • sbf_font_size
    • can_compress_scripts
    • db_upgraded
    • ...

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-bmi-form/includes/form.php
    • > /wp-content/plugins/simple-bmi-form/includes/settings.php
    • > /wp-content/plugins/simple-bmi-form/simple-bmi-form.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #2 (Simple BMI Form settings) image not found
Please take inspiration from this readme.txt

simple-bmi-form/simple-bmi-form.php Passed 13 tests

The entry point to "Simple BMI Form" version 1.0.12 is a PHP file that has certain tags in its header comment area
80 characters long description:
Simple BMI calculator form. The visitor may select Imperial, US or Metric units.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected707 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36564346
JavaScript21212174
PO File17390149
CSS12238

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected