57% stocktech-alerts

Code Review | Stocktech Alerts

WordPress plugin Stocktech Alerts scored57%from 54 tests.

About plugin

  • Plugin page: stocktech-alerts
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Dec 30, 2022
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: startflorin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /121 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.78MB] [CPU: ▼34.59ms] Passed 4 tests

This is a short check of server-side resources used by Stocktech Alerts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1535.15 ▼3.25
Dashboard /wp-admin3.17 ▼0.1825.97 ▼33.95
Posts /wp-admin/edit.php3.17 ▼0.1924.47 ▼25.48
Add New Post /wp-admin/post-new.php3.17 ▼2.7226.36 ▼67.55
Media Library /wp-admin/upload.php3.17 ▼0.0623.95 ▼11.38
Stocktech Alerts /wp-admin/options-general.php?page=stocktech-alerts-settings-config3.1723.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Stocktech Alerts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲6214.37 ▲0.022.06 ▲0.0945.73 ▲2.71
Dashboard /wp-admin2,205 ▲285.79 ▲0.1789.04 ▼1.0637.95 ▼0.34
Posts /wp-admin/edit.php2,113 ▲161.99 ▼0.0435.63 ▼0.1032.45 ▼3.57
Add New Post /wp-admin/post-new.php6,374 ▲4,83927.49 ▲9.20824.70 ▲200.5261.12 ▼38.96
Media Library /wp-admin/upload.php1,413 ▲134.21 ▼0.04104.21 ▲3.2541.17 ▼1.85
Stocktech Alerts /wp-admin/options-general.php?page=stocktech-alerts-settings-config8071.7026.0624.03

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/stocktech-alerts/stocktech_alerts_plugin.php+107
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_widget_stocktech_alerts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stocktech-alerts-settings-config
    • > Notice in wp-content/plugins/stocktech-alerts/stocktech_alerts_plugin.php+36
    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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/stocktech-alerts/stocktech_alerts_activate_plugin_settings.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stocktech-alerts/stocktech_alerts_widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/stocktech-alerts/stocktech_alerts_plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/stocktech-alerts/stocktech_alerts_activate_plugin_admin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=stocktech-alerts-settings-config
    • > Network (severe)
    wp-content/plugins/stocktech-alerts/assets/stocktech-wp.css?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: price alerts and charts

stocktech-alerts/stocktech_alerts_plugin.php 92% from 13 tests

Analyzing the main PHP file in "Stocktech Alerts" version 1.0.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stocktech-alerts.php" instead of "stocktech_alerts_plugin.php")

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
Success! There were no dangerous files found in this plugin1,912 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript351211,142
PHP514852763
SVG1107

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity36.00
▷ Minimum class complexity20.00
▷ Maximum class complexity52.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin