78% kalkulacka-odchodu-do-duchodu

Code Review | Kalkulačka odchodu do důchodu

WordPress plugin Kalkulačka odchodu do důchodu scored78%from 54 tests.

About plugin

  • Plugin page: kalkulacka-odchod...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.9
  • WordPress version: 6.3.1
  • First release: Jan 6, 2017
  • Latest release: Nov 22, 2017
  • Number of updates: 4
  • Update frequency: every 80.0 days
  • Top authors: iinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Kalkulačka odchodu do důchodu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.17 ▼4.27
Dashboard /wp-admin3.32 ▲0.0246.62 ▼11.59
Posts /wp-admin/edit.php3.37 ▲0.0251.79 ▼1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.86 ▼4.08
Media Library /wp-admin/upload.php3.24 ▲0.0131.66 ▼2.86
Kalkulačka odchodu do důchodu /wp-admin/options-general.php?page=kalkulacka-odchodu-do-duchodu/admin/admin.php3.2133.13

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kalkulačka odchodu do důchodu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.69 ▲0.432.02 ▲0.1444.30 ▼0.62
Dashboard /wp-admin2,199 ▲255.57 ▼0.1093.19 ▼0.1242.38 ▼2.33
Posts /wp-admin/edit.php2,104 ▲71.96 ▲0.0241.97 ▲4.0537.37 ▲2.32
Add New Post /wp-admin/post-new.php1,531 ▼023.22 ▼0.03660.08 ▲26.1454.81 ▲3.70
Media Library /wp-admin/upload.php1,404 ▲104.21 ▲0.0094.55 ▼6.0942.34 ▼5.71
Kalkulačka odchodu do důchodu /wp-admin/options-general.php?page=kalkulacka-odchodu-do-duchodu/admin/admin.php8292.0024.9028.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/kalkulacka-odchodu-do-duchodu/kalkulacka.php
  • 5× 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/kalkulacka-odchodu-do-duchodu/admin/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/kalkulacka-odchodu-do-duchodu/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/kalkulacka-odchodu-do-duchodu/front/front.php:3
    • > PHP Warning
      parse_ini_file(KALKULACKA_ODCHODU_DO_DUCHODU_PLUGIN_DIR/config.ini): failed to open stream: No such file or directory in wp-content/plugins/kalkulacka-odchodu-do-duchodu/settings.php on line 3
    • > PHP Warning
      Use of undefined constant KALKULACKA_ODCHODU_DO_DUCHODU_PLUGIN_DIR - assumed 'KALKULACKA_ODCHODU_DO_DUCHODU_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/kalkulacka-odchodu-do-duchodu/settings.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

kalkulacka-odchodu-do-duchodu/kalkulacka.php 92% from 13 tests

The principal PHP file in "Kalkulačka odchodu do důchodu" v. 0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("kalkulacka-odchodu-do-duchodu.php" instead of "kalkulacka.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected99 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP422892
INI1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin