74% stockpulse

Code Review | StockPulse

WordPress plugin StockPulse scored74%from 54 tests.

About plugin

  • Plugin page: stockpulse
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.1
  • WordPress version: 6.3.1
  • First release: May 2, 2019
  • Latest release: Jul 19, 2019
  • Number of updates: 16
  • Update frequency: every 4.9 days
  • Top authors: stockpulse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /816 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.03ms] Passed 4 tests

This is a short check of server-side resources used by StockPulse
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.396.07 ▼29.88
Dashboard /wp-admin2.10 ▼1.255.52 ▼58.96
Posts /wp-admin/edit.php2.10 ▼1.267.84 ▼39.15
Add New Post /wp-admin/post-new.php2.10 ▼3.795.67 ▼96.14
Media Library /wp-admin/upload.php2.10 ▼1.136.42 ▼29.86
Dashboard /wp-admin/admin.php?page=stockpulse2.106.08
Help /wp-admin/admin.php?page=stockpulsehelp2.106.97
Settings /wp-admin/admin.php?page=stockpulsesettings2.107.86

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for StockPulse
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.22 ▼1.161.56 ▼0.1640.31 ▲2.93
Dashboard /wp-admin2,230 ▲424.87 ▼1.0198.59 ▼15.5479.92 ▲36.38
Posts /wp-admin/edit.php2,128 ▲392.01 ▲0.0233.65 ▼3.5436.10 ▲2.03
Add New Post /wp-admin/post-new.php1,551 ▲3223.27 ▼0.23670.53 ▼8.1754.02 ▼9.96
Media Library /wp-admin/upload.php1,418 ▲274.11 ▼0.2197.57 ▼5.6178.87 ▲35.24
Dashboard /wp-admin/admin.php?page=stockpulse1,2408.72202.8398.34
Help /wp-admin/admin.php?page=stockpulsehelp1,1308.56201.2054.83
Settings /wp-admin/admin.php?page=stockpulsesettings1,1598.64195.2354.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the font-awesome-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stockpulse-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stockpulse-widgetstyles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stockpulse-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stockpulse-widgetstyles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > Notice in wp-content/plugins/stockpulse/stockpulse.php+146
    Undefined variable: symbol
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stockpulsesettings
    • > Notice in wp-content/plugins/stockpulse/stockpulse.php+163
    Trying to access array offset on value of type null

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
You can look at the official readme.txt

stockpulse/stockpulse.php Passed 13 tests

"StockPulse" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
StockPulse WordPress Plugin for Stock Quotes, Charts and and Tickers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin17,237 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,777
CSS173,477757,800
PHP810581589
JavaScript1151171

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png7.34KB4.01KB▼ 45.39%
assets/images/icon.png2.01KB0.40KB▼ 80.13%