84% human-bmi-bmr-calculation

Code Review | Human Bmi Bmr Calculation

WordPress plugin Human Bmi Bmr Calculation scored84%from 54 tests.

About plugin

  • Plugin page: human-bmi-bmr-cal...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Mar 20, 2020
  • Latest release: Jul 8, 2020
  • Number of updates: 8
  • Update frequency: every 13.9 days
  • Top authors: khalifalmahmud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /765 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Human Bmi Bmr Calculation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.25 ▼0.58
Dashboard /wp-admin3.33 ▼0.0247.25 ▼11.36
Posts /wp-admin/edit.php3.44 ▲0.0944.57 ▼10.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.74 ▼19.78
Media Library /wp-admin/upload.php3.25 ▲0.0233.89 ▲0.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: 1 new table, 6 new options
New tables
wp_bmi_bmr_result
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Human Bmi Bmr Calculation: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.74 ▲0.382.06 ▲0.2644.34 ▲0.58
Dashboard /wp-admin2,222 ▲314.86 ▼0.16116.13 ▲16.1746.06 ▲2.31
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0134.50 ▼2.1034.13 ▼2.22
Add New Post /wp-admin/post-new.php1,546 ▲2723.20 ▲0.00635.71 ▼47.1450.21 ▼0.91
Media Library /wp-admin/upload.php1,404 ▲224.23 ▲0.0195.70 ▼3.4543.53 ▼0.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db-date-details-view.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_author_meta() in wp-content/plugins/human-bmi-bmr-calculation/Includes/FrontEnd/ShortCode/Bmi_Bmr/views/bmi-bmr-form.php:92
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/human-bmi-bmr-calculation/Includes/FrontEnd/ShortCode/Bmi_Bmr/views/bmi-bmr-form.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db-date-details-view.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/human-bmi-bmr-calculation/Includes/Dashboard/Menu/views/bmi-bmr-result-list-from-db-date-details-view.php on line 5

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("#")
You can take inspiration from this readme.txt

human-bmi-bmr-calculation/human-bmi-bmr-calculation.php 92% from 13 tests

The principal PHP file in "Human Bmi Bmr Calculation" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin822 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP2164224759
CSS116163

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods39
▷ Static methods12.56%
▷ Public methods3897.44%
▷ Protected methods00.00%
▷ Private methods12.56%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/frontEnd/img/tick_mark.png8.61KB4.20KB▼ 51.24%