83% simple-bmi-calculator

Code Review | BMI Calculator Plugin

WordPress plugin BMI Calculator Plugin scored83%from 54 tests.

About plugin

  • Plugin page: simple-bmi-calcul...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Apr 19, 2016
  • Number of updates: 7
  • Update frequency: every 2.7 days
  • Top authors: llenonzales1988 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,342 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 gracefully, with no errors

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

Server-side resources used by BMI Calculator Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.38 ▼6.51
Dashboard /wp-admin3.33 ▲0.0245.93 ▲0.35
Posts /wp-admin/edit.php3.38 ▲0.0245.71 ▼8.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.87 ▲4.78
Media Library /wp-admin/upload.php3.25 ▲0.0235.84 ▲3.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BMI Calculator Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.28 ▼0.301.68 ▼0.4841.72 ▼5.69
Dashboard /wp-admin2,206 ▲214.87 ▼0.9997.71 ▼1.6441.52 ▲3.36
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.0039.10 ▲3.1533.72 ▼0.34
Add New Post /wp-admin/post-new.php1,544 ▲1018.46 ▼4.88608.32 ▼18.7955.43 ▲1.05
Media Library /wp-admin/upload.php1,385 ▼34.17 ▲0.0195.50 ▼7.8342.36 ▼2.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_bmicalculator_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-bmi-calculator/index.php:12

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-bmi-calculator === )
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can look at the official readme.txt

simple-bmi-calculator/index.php 92% from 13 tests

The main file in "BMI Calculator Plugin" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-bmi-calculator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin117 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1291566
CSS18433
JavaScript19318

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin