80% stock-quote

Code Review | Stock Quote

WordPress plugin Stock Quote scored80%from 54 tests.

About plugin

  • Plugin page: stock-quote
  • Plugin version: 0.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Feb 27, 2021
  • Number of updates: 34
  • Update frequency: every 63.1 days
  • Top authors: urkekg (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /15,344 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.31ms] Passed 4 tests

Server-side resources used by Stock Quote
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.64 ▲6.94
Dashboard /wp-admin3.37 ▲0.0746.40 ▼3.00
Posts /wp-admin/edit.php3.48 ▲0.1346.90 ▼3.58
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.39 ▼9.61
Media Library /wp-admin/upload.php3.29 ▲0.0642.51 ▲10.24
Stock Quote /wp-admin/options-general.php?page=stock-quote3.3331.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: 1 new table, 8 new options
New tables
wp_stock_quote_data
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
stockquote_db_ver
db_upgraded
stockquote_version

Browser metrics Passed 4 tests

A check of browser resources used by Stock Quote
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.35 ▼1.041.63 ▼0.1539.70 ▼0.59
Dashboard /wp-admin2,226 ▲404.88 ▼0.08119.34 ▲12.2943.61 ▲2.40
Posts /wp-admin/edit.php2,108 ▲191.98 ▼0.0444.44 ▲3.2737.31 ▲2.35
Add New Post /wp-admin/post-new.php1,531 ▼1117.40 ▼0.75679.29 ▲71.4050.47 ▼2.70
Media Library /wp-admin/upload.php1,411 ▲204.21 ▲0.00111.17 ▲12.9548.20 ▲6.06
Stock Quote /wp-admin/options-general.php?page=stock-quote1,8432.5752.6840.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_stock_quote_data
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • stockquote_version
    • db_upgraded
    • stockquote_db_ver
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: stock, trading, exchange, stock quote, finance

stock-quote/stock-quote.php Passed 13 tests

The main file in "Stock Quote" v. 0.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Insert static inline stock ticker for known exchange symbols by customizable shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,139 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP42094431,566
PO File1113173353
Sass1100137
JavaScript41682
CSS1011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity70.00
▷ Minimum class complexity55.00
▷ Maximum class complexity85.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods48
▷ Static methods36.25%
▷ Public methods4491.67%
▷ Protected methods00.00%
▷ Private methods48.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/paypal.png1.57KB1.58KB0.00%