83% kursy-walut-nbp

Code Review | NBP Kurs Walut

WordPress plugin NBP Kurs Walut scored 83% from 54 tests.

About plugin

  • Plugin page: kursy-walut-nbp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Apr 7, 2018
  • Number of updates: 13
  • Update frequency: every 31.8 days
  • Top authors: pawelrudnicki (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 1,887 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲146.52ms] Passed 4 tests

A check of server-side resources used by NBP Kurs Walut
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.04210.14 ▲168.98
Dashboard /wp-admin3.34 ▲0.03204.17 ▲150.23
Posts /wp-admin/edit.php3.39 ▲0.03191.87 ▲148.05
Add New Post /wp-admin/post-new.php5.92 ▲0.03248.76 ▲156.31
Media Library /wp-admin/upload.php3.26 ▲0.03165.08 ▲131.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_nbp-widget

Browser metrics Passed 4 tests

Checking browser requirements for NBP Kurs Walut
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲5514.44 ▲0.011.65 ▼0.2437.58 ▼13.56
Dashboard /wp-admin2,203 ▲115.81 ▲0.9092.85 ▼18.3039.56 ▼3.39
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0637.44 ▲1.1033.69 ▲2.50
Add New Post /wp-admin/post-new.php1,534 ▲2021.08 ▲3.57659.67 ▼14.6861.11 ▲6.44
Media Library /wp-admin/upload.php1,385 ▼64.16 ▼0.0794.41 ▼10.5941.35 ▼6.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_nbp-widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kursy-walut-nbp/class.nbp-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kursy-walut-nbp/class.nbp-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === kursy-walut-nbp === )
The official readme.txt is a good inspiration

kursy-walut-nbp/npb-kurs-walut.php 85% from 13 tests

The main file in "NBP Kurs Walut" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kursy-walut-nbp.php" instead of "npb-kurs-walut.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected120 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22913120

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
35 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/HKD.png5.26KB2.22KB▼ 57.80%
images/XDR.png2.22KB0.10KB▼ 95.70%
images/SGD.png2.83KB1.58KB▼ 44.15%
images/HUF.png0.41KB0.17KB▼ 58.47%
images/GBP.png1.52KB0.77KB▼ 49.55%