83% wp-tradingview

Code Review | WP TradingView

WordPress plugin WP TradingView scored83%from 54 tests.

About plugin

  • Plugin page: wp-tradingview
  • Plugin version: 1.7
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Dec 10, 2016
  • Latest release: Apr 13, 2023
  • Number of updates: 36
  • Update frequency: every 64.2 days
  • Top authors: tradepips (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

1,000+ active /18,050 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.11ms] Passed 4 tests

This is a short check of server-side resources used by WP TradingView
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4539.73 ▼9.17
Dashboard /wp-admin3.80 ▲0.4651.84 ▼8.66
Posts /wp-admin/edit.php3.92 ▲0.5652.64 ▲4.24
Add New Post /wp-admin/post-new.php6.38 ▲0.49100.75 ▲5.16
Media Library /wp-admin/upload.php3.73 ▲0.4945.88 ▲12.96

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP TradingView
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.61 ▼1.032.20 ▲0.4037.97 ▼5.63
Dashboard /wp-admin2,260 ▲755.10 ▼0.71102.38 ▲2.58100.26 ▲61.38
Posts /wp-admin/edit.php2,145 ▲592.49 ▲0.4740.45 ▲6.1740.15 ▲6.38
Add New Post /wp-admin/post-new.php1,723 ▲20124.61 ▲1.47642.58 ▼9.7137.28 ▼13.38
Media Library /wp-admin/upload.php1,433 ▲424.38 ▲0.1599.49 ▲5.0088.18 ▲45.21

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 7× 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/wp-tradingview/inc/class_chat.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-tradingview/inc/class_ideaview.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-tradingview/inc/class_chart.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-tradingview/inc/admin_page.php:1187
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-tradingview/inc/class_profile.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-tradingview/inc/class_ideastream.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-tradingview/inc/admin_page.php:1187

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 29 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-tradingview/tradingview.php 92% from 13 tests

Analyzing the main PHP file in "WP TradingView" version 1.7
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-tradingview.php" instead of "tradingview.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,777 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP71,4361392,760
JavaScript18117

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity78.80
▷ Minimum class complexity38.00
▷ Maximum class complexity144.00
Average method complexity20.45
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods525.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions2784.38%
▷ Anonymous functions515.62%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.73KB0.90KB0.00%
images/icon-org.png8.79KB5.01KB▼ 42.97%