89% bmi-calculator-shortcode

Code Review | BMI Calculator Plugin

WordPress plugin BMI Calculator Plugin scored89%from 54 tests.

About plugin

  • Plugin page: bmi-calculator-sh...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2015
  • Latest release: Aug 25, 2019
  • Number of updates: 8
  • Update frequency: every 173.0 days
  • Top authors: Waterloo Plugins (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /12,802 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.34ms] Passed 4 tests

An overview of server-side resources used by BMI Calculator Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.19 ▼7.43
Dashboard /wp-admin3.31 ▼0.0446.11 ▼14.08
Posts /wp-admin/edit.php3.36 ▲0.0045.73 ▼1.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.94 ▼2.82
Media Library /wp-admin/upload.php3.23 ▲0.0033.38 ▲0.97

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BMI Calculator Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.60 ▼0.788.70 ▲6.9937.30 ▼4.00
Dashboard /wp-admin2,206 ▲185.90 ▲1.04107.41 ▲1.8142.03 ▲2.41
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0438.95 ▲2.0235.63 ▲2.94
Add New Post /wp-admin/post-new.php1,542 ▲2218.33 ▼4.86589.94 ▼57.9750.12 ▼8.41
Media Library /wp-admin/upload.php1,391 ▲64.18 ▲0.0195.57 ▼4.0941.39 ▼3.00

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Material design theme), #2 (Clean (Bootstrap) theme), #3 (Default theme), #4 (Material design theme with input)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === bmi-calculator-shortcode === )
Please take inspiration from this readme.txt

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

The primary PHP file in "BMI Calculator Plugin" version 1.0.3 is used by WordPress to initiate all plugin functionality
129 characters long description:
A simple stylable BMI calculator that you can add anywhere. Use shortcode [bmi]. Visit the plugin download page for more options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin446 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1509310
PHP2141290
JavaScript17046

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.19MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png50.52KB9.90KB▼ 80.40%
screenshot-1.png40.36KB8.04KB▼ 80.08%
screenshot-2.png45.69KB11.06KB▼ 75.79%
screenshot-3.png54.55KB13.40KB▼ 75.44%