90% b-sharpe-converter-shortcode

Code Review | [b-sharpe-converter] shortcode

WordPress plugin [b-sharpe-converter] shortcode scored90%from 54 tests.

About plugin

  • Plugin page: b-sharpe-converte...
  • Plugin version: 5.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Jun 22, 2021
  • Latest release: Oct 8, 2021
  • Number of updates: 30
  • Update frequency: every 3.6 days
  • Top authors: bsharpe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /651 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.59ms] Passed 4 tests

This is a short check of server-side resources used by [b-sharpe-converter] shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.36 ▲1.77
Dashboard /wp-admin3.34 ▲0.0451.86 ▼0.44
Posts /wp-admin/edit.php3.39 ▲0.0450.37 ▼2.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.92 ▼4.71
Media Library /wp-admin/upload.php3.26 ▲0.0437.11 ▲3.36

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

[b-sharpe-converter] shortcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.55 ▼0.611.96 ▲0.2345.71 ▲1.03
Dashboard /wp-admin2,221 ▲185.79 ▼0.08103.71 ▼12.1840.68 ▼3.83
Posts /wp-admin/edit.php2,100 ▼02.04 ▼0.0935.45 ▼3.9333.42 ▼3.89
Add New Post /wp-admin/post-new.php1,554 ▲2818.34 ▲0.67673.63 ▼31.3055.75 ▼9.73
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.01100.04 ▼3.2243.71 ▼4.30

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: currency, exchange, forex, finance, money

b-sharpe-converter-shortcode/b-sharpe-converter-shortcode.php Passed 13 tests

"[b-sharpe-converter] shortcode" version 5.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Easily insert b-sharpe's currency converter on your pages with a simple shortcode.

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
There were no executable files found in this plugin10,424 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92,3007039,559
CSS51211727
PHP21223138

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png24.45KB8.96KB▼ 63.38%
public/img/logo_bsharpe_comparison.png1.10KB1.12KB0.00%
assets/screenshot-2.png21.78KB8.85KB▼ 59.36%
assets/icon-128x128.png4.81KB2.95KB▼ 38.74%
assets/banner-772x250.png32.34KB9.46KB▼ 70.76%