10% greek-bmi-calculator

Code Review | Greek BMI Calculator

WordPress plugin Greek BMI Calculator scored10%from 54 tests.

About plugin

  • Plugin page: greek-bmi-calculator
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Mar 25, 2020
  • Number of updates: 19
  • Update frequency: every 2.5 days
  • Top authors: katsaros (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /510 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/greek-bmi-calculator/greek-bmi-calculator.php+31
    Use of undefined constant loadingTheJsInGreekBMICalculator - assumed 'loadingTheJsInGreekBMICalculator' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.17ms] Passed 4 tests

Analyzing server-side resources used by Greek BMI Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.52 ▼37.57
Dashboard /wp-admin2.05 ▼1.265.44 ▼49.97
Posts /wp-admin/edit.php2.05 ▼1.315.59 ▼45.03
Add New Post /wp-admin/post-new.php2.05 ▼3.846.70 ▼100.11
Media Library /wp-admin/upload.php2.05 ▼1.185.52 ▼30.47

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Greek BMI Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.42 ▼0.938.46 ▲6.4847.36 ▲2.31
Dashboard /wp-admin2,200 ▲205.64 ▼0.0284.79 ▼19.4241.60 ▼2.78
Posts /wp-admin/edit.php2,102 ▲22.01 ▲0.0433.64 ▼2.9538.24 ▲3.85
Add New Post /wp-admin/post-new.php1,528 ▼323.05 ▼0.25687.04 ▲7.8661.44 ▲10.12
Media Library /wp-admin/upload.php1,402 ▲24.18 ▼0.1397.33 ▼5.3849.98 ▲3.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/greek-bmi-calculator/greek-bmi-calculator.php+31
    Use of undefined constant loadingTheJsInGreekBMICalculator - assumed 'loadingTheJsInGreekBMICalculator' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/greek-bmi-calculator/greek-bmi-calculator.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/greek-bmi-calculator/greek-bmi-calculator.php on line 13

User-side errors Passed 1 test

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

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
Attributes that need to be fixed: The official readme.txt might help

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

This is the main PHP file of "Greek BMI Calculator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
83 characters long description:
Add the shortcode [bmi-greek-blue] or [bmi-greek-green] to show the BMI calculator.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11211119
CSS17082
JavaScript11021

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin