84% target-heart-rate-calculator

Code Review | Target Heart Rate

WordPress plugin Target Heart Rate scored84%from 54 tests.

About plugin

  • Plugin page: target-heart-rate...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 19, 2017
  • Latest release: May 19, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: abulogics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Target Heart Rate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.13 ▼0.29
Dashboard /wp-admin3.31 ▲0.0143.51 ▼5.84
Posts /wp-admin/edit.php3.36 ▲0.0147.55 ▲1.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.69 ▼20.37
Media Library /wp-admin/upload.php3.23 ▲0.0137.14 ▲4.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Target Heart Rate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲10113.81 ▼0.608.44 ▲6.5644.89 ▲5.79
Dashboard /wp-admin2,195 ▲215.54 ▼0.0885.26 ▼4.8738.27 ▼5.88
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0240.88 ▲3.8536.87 ▲3.17
Add New Post /wp-admin/post-new.php1,526 ▼523.19 ▲0.09663.11 ▲61.3953.74 ▲0.69
Media Library /wp-admin/upload.php1,394 ▼94.23 ▲0.1998.06 ▲0.8040.56 ▼2.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-heart-rate-calculator/index.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
These attributes need your attention:
  • Requires at least: Invalid version format
The official readme.txt might help

target-heart-rate-calculator/index.php 92% from 13 tests

The main PHP script in "Target Heart Rate" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("target-heart-rate-calculator.php" instead of "index.php")

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 plugin44 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1163822
JavaScript15017
CSS1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! 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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin