Wordpress Financial Ratio Block
- Tested up to: 6.4.1
- Stable tag: 1.1.0
Provides a block for Wordpress that displays a financial ratio of a company. It can be found in the Wordpress Plugin Directory under Financial Ratio.
Description
This plugin enables a block in the embed category to display a financial ratio of a target company. There are a number of ratios to choose from, for example price/earnings, price/book or market capitalization.
The block will invoke an API from xelonic.com to retrieve it's data.
There's no account required to use this data!
You can find more information on the product page.
Screenshots

Installation
Via the Wordpress Plugin Directory:
- In your Wordpress installation go to the Plugins screen, click Add New, and search for Financial Ratio.
- Click Install Now and after that’s complete, click Activate.
Or manually:
- Upload and unpack the plugin zip to your wordpress installation at
<wordpress installation>/wp-content/plugins. - Activate the plugin through the 'Plugins' screen in WordPress.
Now the block is ready-to-use.
- In the block editor search for
financial ratioand add it to your page. - Configure the block using the right sidebar.
Local Development
This plugin is based on the code skeleton @wordpress/create-block and was initially generated with
npx @wordpress/create-block financial-ratio-block --wp-env
Manage the dev environment
Make sure you use node version 14. This can be done by using the tool nvm (a corresponding .nvmrc is in the project directory). And then:
nvm install
nvm use
Inside the project directory:
npm install
Then start the wordpress instance:
npm run env -- start
Then start the hot-update mechanism for development:
npm run start
When you're done, stop the environment:
npm run env -- stop
To get fully rid of the state (including docker volumes) run:
npm run env -- destroy
Configure Wordpress
Then you can navigate to wordpress, by default on http://localhost:8888/wp-admin. There you have to activate the plugin for the block.
The default username is admin with password password.
- go to
Plugins - activate
Financial Ratio - go to
Appearance->Editor - click inside the big editor
- on the upper-left click on the
+ - search for
financ - drag & drop the block somewhere and edit it
Test with a plain wordpress
You can use the docker-compose.yml in this repo to test it:
docker-compose up -d
Then later remove it fully again with:
docker-compose down -v
Update the SVN
./update-svn.sh . ../financial-ratio-block-svn
cd ../financial-ratio-block-svn
svn commit -m "something meaningful"
Release
cd ../financial-ratio-block-svn
svn cp trunk tags/<version>
svn commit -m "something meaningful"