71% live-stock-prices-for-wordpress

Code Review | Financial Stocks & Crypto Market Data Plugin

WordPress plugin Financial Stocks & Crypto Market Data Plugin scored71%from 54 tests.

About plugin

  • Plugin page: live-stock-prices...
  • Plugin version: 1.10.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2018
  • Latest release: Oct 3, 2023
  • Number of updates: 106
  • Update frequency: every 17.8 days
  • Top authors: maxeodhd (70.75%)deios (30.19%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /15,970 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲624.17ms] 50% from 4 tests

Analyzing server-side resources used by Financial Stocks & Crypto Market Data Plugin
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 890.31ms on /wp-admin/admin.php?page=eod-stock-prices)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 624.17ms on /wp-admin/admin.php?page=eod-stock-prices)
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7649.96 ▲7.93
Dashboard /wp-admin3.69 ▲0.38885.11 ▲829.66
Posts /wp-admin/edit.php4.13 ▲0.77896.09 ▲838.83
Add New Post /wp-admin/post-new.php6.71 ▲0.83941.52 ▲831.57
Media Library /wp-admin/upload.php3.94 ▲0.71866.59 ▲827.51
Shortcode Generator /wp-admin/admin.php?page=eod-examples3.93875.97
Settings /wp-admin/admin.php?page=eod-settings3.94878.60
Financial Table presets /wp-admin/edit.php?post_type=financials4.04861.83
Fundamental Data presets /wp-admin/edit.php?post_type=fundamental-data4.04890.99
Quick Start & Samples /wp-admin/admin.php?page=eod-stock-prices3.94890.31

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 69 new files
Database: no new tables, 11 new options
New WordPress options
widget_eod_financial_widget
widget_eod_fundamental_widget
can_compress_scripts
widget_eod_stock_prices_widget
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_eod_converter_widget
widget_recent-comments
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Financial Stocks & Crypto Market Data Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,030 ▲24414.25 ▼0.4820.66 ▲18.7739.56 ▼1.30
Dashboard /wp-admin2,304 ▲1244.99 ▼0.6294.88 ▲5.3540.01 ▼0.57
Posts /wp-admin/edit.php2,216 ▲1162.39 ▲0.4437.02 ▼2.1532.39 ▼4.65
Add New Post /wp-admin/post-new.php1,477 ▼4918.44 ▼4.70632.63 ▼3.8448.68 ▼5.94
Media Library /wp-admin/upload.php1,512 ▲1154.50 ▲0.30100.80 ▲1.7745.22 ▲2.37
Shortcode Generator /wp-admin/admin.php?page=eod-examples2,1864.5961.5085.40
Settings /wp-admin/admin.php?page=eod-settings1,4494.4657.2549.00
Financial Table presets /wp-admin/edit.php?post_type=financials1,1802.3836.5631.67
Fundamental Data presets /wp-admin/edit.php?post_type=fundamental-data1,1802.3933.5027.17
Quick Start & Samples /wp-admin/admin.php?page=eod-stock-prices1,4994.0341.6253.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_eod_stock_prices_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_eod_news_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_eod_fundamental_widget
    • widget_eod_financial_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eod-stock-prices
    • > Notice in wp-content/plugins/live-stock-prices-for-wordpress/admin/template/sidebar.php+45
    Trying to access array offset on value of type bool

SRP 0% 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
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/live-stock-prices-for-wordpress/admin/template/examples/converter.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/template/realtime_ticker.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/template/financials.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/widget/template/ticker-widget.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/template/ticker.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/template/converter.php
    • > /wp-content/plugins/live-stock-prices-for-wordpress/template/news.php
  • 99× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: _this in wp-content/plugins/live-stock-prices-for-wordpress/widget/template/fundamental-widget-form.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_field_id() on null in wp-content/plugins/live-stock-prices-for-wordpress/widget/template/ticker-widget-form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/live-stock-prices-for-wordpress/plugins/elementor/widgets/Elementor_EOD_Converter.php:4
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/live-stock-prices-for-wordpress/template/ticker.php on line 2
    • > PHP Notice
      Trying to get property 'list' of non-object in wp-content/plugins/live-stock-prices-for-wordpress/template/financials.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/live-stock-prices-for-wordpress/admin/template/general.php:2
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/live-stock-prices-for-wordpress/template/ticker.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_news_topics() on null in wp-content/plugins/live-stock-prices-for-wordpress/admin/template/examples/news.php:2
    • > PHP Notice
      Undefined variable: fd in wp-content/plugins/live-stock-prices-for-wordpress/template/financials.php on line 12
    • > PHP Notice
      Trying to get property 'group' of non-object in wp-content/plugins/live-stock-prices-for-wordpress/template/financials.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt might help

live-stock-prices-for-wordpress/eod-stock-prices-plugin.php 92% from 13 tests

The primary PHP file in "Financial Stocks & Crypto Market Data Plugin" version 1.10.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("live-stock-prices-for-wordpress.php" instead of "eod-stock-prices-plugin.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
Good job! No executable or dangerous file extensions detected7,223 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP494825414,067
JavaScript53475381,781
CSS351471,348
SVG10027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods127
▷ Static methods118.66%
▷ Public methods11792.13%
▷ Protected methods107.87%
▷ Private methods00.00%
Functions29
▷ Named functions2482.76%
▷ Anonymous functions517.24%
Constants11
▷ Global constants11100.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
8 PNG files occupy 0.29MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/points_field_left.png63.75KB66.58KB0.00%
img/sample_ticker.png7.09KB3.75KB▼ 47.17%
img/sample_converter.png4.68KB2.55KB▼ 45.45%
img/points_field_right.png39.97KB42.52KB0.00%
img/EOD_logo_w.png16.52KB10.15KB▼ 38.57%