84% healthy-bmi-calculator

Code Review | Healthy BMI Calculator

WordPress plugin Healthy BMI Calculator scored84%from 54 tests.

About plugin

  • Plugin page: healthy-bmi-calcu...
  • Plugin version: 1.2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Jul 11, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 16
  • Update frequency: every 3.4 days
  • Top authors: ourvalley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.26ms] Passed 4 tests

Analyzing server-side resources used by Healthy BMI Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.81 ▼6.39
Dashboard /wp-admin3.33 ▲0.0348.26 ▼2.73
Posts /wp-admin/edit.php3.38 ▲0.0247.58 ▲0.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.54 ▼16.84
Media Library /wp-admin/upload.php3.25 ▲0.0237.93 ▲0.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_sm_health_bmi_widget

Browser metrics Passed 4 tests

Checking browser requirements for Healthy BMI Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.141.61 ▼0.0243.83 ▼0.83
Dashboard /wp-admin2,195 ▲185.57 ▼0.0985.10 ▼2.6240.39 ▼3.75
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0141.36 ▲1.0737.07 ▼1.43
Add New Post /wp-admin/post-new.php1,526 ▼1123.02 ▲4.77631.83 ▲3.9251.78 ▼13.88
Media Library /wp-admin/upload.php1,400 ▼34.17 ▲0.0098.36 ▼5.3340.72 ▼4.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_sm_health_bmi_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/healthy-bmi-calculator/healthy-bmi-calculator.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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: widget, health, shortcode

healthy-bmi-calculator/healthy-bmi-calculator.php Passed 13 tests

This is the main PHP file of "Healthy BMI Calculator" version 1.2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
Provides a customizable BMI Calculator as a widget or shortcode. Can only be one calculator per page.

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
Everything looks great! No dangerous files found in this plugin19 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10018
PHP1001
JavaScript1020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions4
▷ Named functions4100.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
No PNG files were detected