83% kurs-zlota-nbp

Code Review | NBP Kurs Złota

WordPress plugin NBP Kurs Złota scored83%from 54 tests.

About plugin

  • Plugin page: kurs-zlota-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 26, 2017
  • Latest release: Feb 26, 2017
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: pawelrudnicki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /589 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
Install script ran successfully

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

An overview of server-side resources used by NBP Kurs Złota
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.03158.16 ▲113.46
Dashboard /wp-admin3.34 ▲0.03236.51 ▲185.96
Posts /wp-admin/edit.php3.39 ▲0.03160.17 ▲113.04
Add New Post /wp-admin/post-new.php5.92 ▲0.03225.58 ▲141.82
Media Library /wp-admin/upload.php3.26 ▲0.02244.19 ▲207.94

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_nbp-gold-widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

NBP Kurs Złota: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.42 ▲0.051.87 ▼0.2153.48 ▲3.38
Dashboard /wp-admin2,206 ▲185.91 ▲0.0199.16 ▼1.9339.22 ▼1.42
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0241.18 ▲0.6134.54 ▼2.06
Add New Post /wp-admin/post-new.php1,533 ▲520.91 ▼2.42709.24 ▲83.8955.65 ▲6.94
Media Library /wp-admin/upload.php1,391 ▲64.19 ▲0.00105.22 ▲0.1845.28 ▲2.07

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 detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_nbp-gold-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kurs-zlota-nbp/class.nbp-gold-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kurs-zlota-nbp/class.nbp-gold-widget.php:5

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === kurs-zlota-nbp === )
You can take inspiration from this readme.txt

kurs-zlota-nbp/nbp-kurs-zlota.php 85% from 13 tests

The principal PHP file in "NBP Kurs Złota" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("kurs-zlota-nbp.php" instead of "nbp-kurs-zlota.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
No dangerous file extensions were detected92 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2211592

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.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected