78% kursy-walut-exchange-rates

Code Review | Kursy walut (Exchange rates)

WordPress plugin Kursy walut (Exchange rates) scored78%from 54 tests.

About plugin

  • Plugin page: kursy-walut-excha...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.5
  • WordPress version: 6.3.1
  • First release: Jul 5, 2016
  • Latest release: May 17, 2017
  • Number of updates: 35
  • Update frequency: every 9.1 days
  • Top authors: ekantor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,492 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.02MB] [CPU: ▼6.39ms] Passed 4 tests

Analyzing server-side resources used by Kursy walut (Exchange rates)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.95 ▼3.47
Dashboard /wp-admin3.33 ▲0.0247.34 ▼3.67
Posts /wp-admin/edit.php3.44 ▲0.0846.78 ▼3.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.47 ▼15.28
Media Library /wp-admin/upload.php3.25 ▲0.0235.19 ▼1.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_kw_config
New WordPress options
db_upgraded
widget_recent-posts
widget_exchange_rates_ekantorpl_kw_widget
can_compress_scripts
widget_theysaidso_widget
kw_db_version
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Kursy walut (Exchange rates)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20413.69 ▼0.6813.00 ▲11.1442.50 ▼2.78
Dashboard /wp-admin2,225 ▲374.91 ▼0.01106.25 ▼10.0977.62 ▲30.96
Posts /wp-admin/edit.php2,111 ▲252.00 ▼0.0536.62 ▲1.7232.43 ▼0.50
Add New Post /wp-admin/post-new.php1,546 ▲2718.22 ▼4.77649.77 ▼6.2058.54 ▼5.91
Media Library /wp-admin/upload.php1,404 ▲134.22 ▼0.0294.89 ▼0.1448.32 ▲6.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_exchange_rates_ekantorpl_kw_widget
    • db_upgraded
    • kw_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kursy-walut-exchange-rates/kursy-walut-ekantorpl.php
    • > /wp-content/plugins/kursy-walut-exchange-rates/table.php
    • > /wp-content/plugins/kursy-walut-exchange-rates/index.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kursy-walut-exchange-rates/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kursy-walut-exchange-rates/__class/Exchange_rates_ekantorpl_Kw_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kursy-walut-exchange-rates/__class/Exchange_rates_ekantorpl_Kw_widget.php:6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/kursy-walut-exchange-rates/__class/kw_setup.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/kursy-walut-exchange-rates/__class/kw_setup.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

kursy-walut-exchange-rates/kursy-walut-ekantorpl.php 85% from 13 tests

This is the main PHP file of "Kursy walut (Exchange rates)" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kursy-walut-exchange-rates.php" instead of "kursy-walut-ekantorpl.php")

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
Good job! No executable or dangerous file extensions detected1,123 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG100685
PHP119370418
CSS22312
JavaScript2028

PHP code Passed 2 tests

Analyzing 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.24
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces3
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1869.23%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
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
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ekantor_logo.png9.80KB1.29KB▼ 86.82%
img/ekantor_logo_wp_male.png9.80KB1.29KB▼ 86.82%