84% wp-bmi

Code Review | WP BMI

WordPress plugin WP BMI scored84%from 54 tests.

About plugin

  • Plugin page: wp-bmi
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 8, 2014
  • Latest release: Nov 11, 2020
  • Number of updates: 10
  • Update frequency: every 216.5 days
  • Top authors: nabtron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by WP BMI
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.85 ▲0.39
Dashboard /wp-admin3.32 ▲0.0147.84 ▼3.80
Posts /wp-admin/edit.php3.37 ▲0.0153.58 ▲1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.12 ▼20.50
Media Library /wp-admin/upload.php3.24 ▲0.0141.99 ▲1.35

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

Filesystem and database footprint
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
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP BMI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.62 ▼0.731.90 ▼0.1638.35 ▼4.51
Dashboard /wp-admin2,206 ▲154.89 ▼0.99108.30 ▼4.5738.57 ▼1.92
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0240.68 ▼1.0134.84 ▼1.42
Add New Post /wp-admin/post-new.php1,533 ▲523.12 ▲0.05684.49 ▼7.4564.75 ▼0.17
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0697.01 ▼18.0944.49 ▼3.21

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-bmi/wp-bmi.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-bmi === )
The official readme.txt might help

wp-bmi/wp-bmi.php Passed 13 tests

This is the main PHP file of "WP BMI" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Body Mass Index calculator as a widget on sidebar

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 detected95 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16850
CSS10029
JavaScript17016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.17KB3.05KB▼ 74.93%