83% keto-calculator

Code Review | Keto Calculator

WordPress plugin Keto Calculator scored83%from 54 tests.

About plugin

  • Plugin page: keto-calculator
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-5.9.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2016
  • Latest release: Mar 21, 2022
  • Number of updates: 18
  • Update frequency: every 106.3 days
  • Top authors: therightsw (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,810 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.90ms] Passed 4 tests

An overview of server-side resources used by Keto Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.90 ▼3.51
Dashboard /wp-admin3.39 ▲0.0450.30 ▼17.73
Posts /wp-admin/edit.php3.44 ▲0.0847.83 ▼6.13
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.35 ▼16.21
Media Library /wp-admin/upload.php3.31 ▲0.0836.05 ▲1.69

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Keto Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5714.34 ▲0.071.93 ▼0.1841.65 ▼7.35
Dashboard /wp-admin2,195 ▲185.57 ▼0.0891.98 ▼11.5942.18 ▼2.20
Posts /wp-admin/edit.php2,100 ▼02.13 ▲0.1734.56 ▼5.2634.51 ▼3.69
Add New Post /wp-admin/post-new.php1,526 ▼323.33 ▲0.22695.79 ▼3.7255.95 ▲4.06
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0298.86 ▼4.8543.29 ▼3.28

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/keto-calculator/ketocalculator.php:16

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: wordpress plugin development, wp, keto, keto diet plan, keto calculator...

keto-calculator/ketocalculator.php 77% from 13 tests

The principal PHP file in "Keto Calculator" v. 1.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 351 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("keto-calculator.php" instead of "ketocalculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin666 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File3168248535
PHP12610129
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin