10% investment-decision-helper

Code Review | Investment Decision Helper

WordPress plugin Investment Decision Helper scored 10% from 54 tests.

About plugin

  • Plugin page: investment-decisi...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Apr 16, 2014
  • Number of updates: 26
  • Update frequency: every 0.3 days
  • Top authors: anibalealvarezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,278 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/investment-decision-helper/investment-decision.php+515
    Function create_function() is deprecated

Server metrics [RAM: ▼1.67MB] [CPU: ▼54.45ms] Passed 4 tests

Analyzing server-side resources used by Investment Decision Helper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.145.73 ▼43.54
Dashboard /wp-admin2.35 ▼0.966.12 ▼39.88
Posts /wp-admin/edit.php2.35 ▼1.017.74 ▼41.26
Add New Post /wp-admin/post-new.php2.35 ▼3.546.72 ▼93.11
Media Library /wp-admin/upload.php2.35 ▼0.897.37 ▼27.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 85 new files
Database: no new tables, 7 new options
New WordPress options
widget_idh_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Investment Decision Helper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.31 ▼1.081.65 ▼0.1239.89 ▲2.33
Dashboard /wp-admin2,209 ▲215.91 ▲0.01108.80 ▼10.7441.81 ▼4.29
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0438.81 ▼5.5336.14 ▼0.36
Add New Post /wp-admin/post-new.php1,531 ▲223.37 ▲5.10633.04 ▼35.3859.72 ▲8.86
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0197.14 ▼3.3943.55 ▼0.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/investment-decision-helper/investment-decision.php+515
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_idh_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph.php
    • > /wp-content/plugins/investment-decision-helper/grafica-comparacion.php
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Theme' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/themes/AquaTheme.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ticks' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph_radar.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ImgData' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/imgdata_stars.inc.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Plot' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph_error.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Theme' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/themes/PastelTheme.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'LinearScale' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph_log.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Theme' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/themes/OrangeTheme.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Plot' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph_line.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Theme' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/themes/RoseTheme.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Graph' not found in wp-content/plugins/investment-decision-helper/jpgraph/src/jpgraph_gantt.php:330

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
Please take inspiration from this readme.txt

investment-decision-helper/investment-decision.php 92% from 13 tests

The primary PHP file in "Investment Decision Helper" version 1.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("investment-decision-helper.php" instead of "investment-decision.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
No dangerous file extensions were detected29,031 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP634,6515,43228,861
PO File26676163
CSS1007

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity28.83
▷ Minimum class complexity1.00
▷ Maximum class complexity478.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes143
▷ Abstract classes10.70%
▷ Concrete classes14299.30%
▷ Final classes00.00%
Methods1,399
▷ Static methods372.64%
▷ Public methods1,399100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants354
▷ Global constants354100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin