10% ls-wp-currency-byn

Code Review | LS WP Currency BYN

WordPress plugin LS WP Currency BYN scored 10% from 54 tests.

About plugin

  • Plugin page: ls-wp-currency-byn
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6
  • WordPress version: 6.3.1
  • First release: Dec 17, 2020
  • Latest release: Dec 21, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: lightningsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 303 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/ls-wp-currency-byn/ls-wp-currency-byn.php+36
    Illegal string offset 'Cur_Abbreviation'

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

A check of server-side resources used by LS WP Currency BYN
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.61 ▼8.48
Dashboard /wp-admin3.31 ▲0.0145.36 ▼12.37
Posts /wp-admin/edit.php3.36 ▲0.0148.84 ▼11.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.63 ▼31.34
Media Library /wp-admin/upload.php3.23 ▲0.0139.83 ▼4.80

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
ls_cb_kurs
widget_recent-posts

Browser metrics Passed 4 tests

LS WP Currency BYN: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲2413.16 ▼1.241.73 ▼1.0342.53 ▼15.66
Dashboard /wp-admin2,230 ▲215.82 ▲0.94103.91 ▼9.6774.05 ▲22.20
Posts /wp-admin/edit.php2,110 ▲181.97 ▼0.0436.90 ▼5.7938.51 ▼2.74
Add New Post /wp-admin/post-new.php1,548 ▲3423.14 ▲1.37695.64 ▼30.0460.63 ▼6.01
Media Library /wp-admin/upload.php1,403 ▲154.13 ▼0.09119.85 ▼8.9183.42 ▲20.68

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ls-wp-currency-byn/ls-wp-currency-byn-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ls-wp-currency-byn/ls-wp-currency-byn.php:15

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: currency, byn

ls-wp-currency-byn/ls-wp-currency-byn.php 92% from 13 tests

The primary PHP file in "LS WP Currency BYN" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected110 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31510105
SVG1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.31MB with 0.20MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png14.59KB4.99KB▼ 65.81%
images/banner-772x250.png301.56KB118.64KB▼ 60.66%