89% stock-charts-by-public-com

Code Review | Stock Charts by Public.com

WordPress plugin Stock Charts by Public.com scored89%from 54 tests.

About plugin

  • Plugin page: stock-charts-by-p...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Apr 14, 2022
  • Number of updates: 7
  • Update frequency: every 84.3 days
  • Top authors: publichello (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.38ms] Passed 4 tests

A check of server-side resources used by Stock Charts by Public.com
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.38 ▲0.36
Dashboard /wp-admin3.42 ▲0.0846.63 ▼12.40
Posts /wp-admin/edit.php3.54 ▲0.1846.19 ▲2.84
Add New Post /wp-admin/post-new.php6.04 ▲0.1598.43 ▲8.55
Media Library /wp-admin/upload.php3.35 ▲0.1233.90 ▼0.30
Stock Charts by Public.com /wp-admin/options-general.php?page=options-stock-charts-public3.3230.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Stock Charts by Public.com: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.36 ▼0.161.93 ▲0.2338.05 ▼2.16
Dashboard /wp-admin2,206 ▲265.54 ▼0.1481.98 ▼8.2938.60 ▼4.25
Posts /wp-admin/edit.php2,111 ▲142.00 ▼0.0038.54 ▲3.8633.98 ▲1.74
Add New Post /wp-admin/post-new.php1,547 ▲2118.65 ▼4.35605.26 ▼70.8471.77 ▲14.39
Media Library /wp-admin/upload.php1,408 ▲84.24 ▼0.0795.37 ▼5.7141.69 ▼2.12
Stock Charts by Public.com /wp-admin/options-general.php?page=options-stock-charts-public8012.0324.6126.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: stock trading, stocks, stock market, stock charts

stock-charts-by-public-com/index.php 77% from 13 tests

The primary PHP file in "Stock Charts by Public.com" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 256 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("stock-charts-by-public-com.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin442 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP13213468419
JSON10010
SVG5005
CSS3004
JavaScript4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin