84% exchange-rate-belarusbank-by-atlas

Code Review | Exchange rate Belarusbank by Atlas

WordPress plugin Exchange rate Belarusbank by Atlas scored84%from 54 tests.

About plugin

  • Plugin page: exchange-rate-bel...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Jul 26, 2020
  • Latest release: May 14, 2021
  • Number of updates: 11
  • Update frequency: every 26.7 days
  • Top authors: atlas89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Exchange rate Belarusbank by Atlas
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.99 ▼5.51
Dashboard /wp-admin3.32 ▲0.0142.95 ▼2.49
Posts /wp-admin/edit.php3.37 ▲0.0145.04 ▼3.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.61 ▼20.35
Media Library /wp-admin/upload.php3.24 ▲0.0133.85 ▼1.52

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, 7 new options
New tables
wp_currency_table
New WordPress options
db_upgraded
widget_recent-comments
widget_atl_kurs
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Exchange rate Belarusbank by Atlas
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.411.66 ▼0.0441.25 ▼2.11
Dashboard /wp-admin2,206 ▲184.80 ▼1.04110.26 ▲9.7043.17 ▲3.76
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0233.14 ▼6.6432.50 ▼4.61
Add New Post /wp-admin/post-new.php1,533 ▲1423.21 ▲0.05646.39 ▲37.3957.27 ▼0.09
Media Library /wp-admin/upload.php1,388 ▲34.26 ▲0.0796.56 ▼3.7540.58 ▼2.67

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_atl_kurs
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× 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/exchange-rate-belarusbank-by-atlas/widgets/atl-wp-widget-currency.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/exchange-rate-belarusbank-by-atlas/wp-atl-kurs-valut.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: exchange rate belarusbank

exchange-rate-belarusbank-by-atlas/wp-atl-kurs-valut.php 85% from 13 tests

The primary PHP file in "Exchange rate Belarusbank by Atlas" version 1.3.0 is used by WordPress to initiate all plugin functionality
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 ("exchange-rate-belarusbank-by-atlas.php" instead of "wp-atl-kurs-valut.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47785437
PO File1243262

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected