78% inline-stock-quotes

Code Review | Inline Stock Quotes

WordPress plugin Inline Stock Quotes scored78%from 54 tests.

About plugin

  • Plugin page: inline-stock-quotes
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Sep 13, 2017
  • Number of updates: 9
  • Update frequency: every 77.9 days
  • Top authors: ebernstein (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Inline Stock Quotes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.06 ▲3.06
Dashboard /wp-admin3.37 ▲0.0758.04 ▲6.84
Posts /wp-admin/edit.php3.42 ▲0.0651.67 ▼2.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.25 ▼9.92
Media Library /wp-admin/upload.php3.29 ▲0.0639.98 ▲1.24
Inline Quotes /wp-admin/options-general.php?page=inline-stock-setting-admin3.2433.70

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Inline Stock Quotes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.55 ▼0.171.74 ▲0.1345.50 ▲1.12
Dashboard /wp-admin2,199 ▲255.61 ▼0.0694.68 ▼2.1342.73 ▼4.41
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0233.56 ▼2.2736.03 ▲0.64
Add New Post /wp-admin/post-new.php1,529 ▲123.21 ▲0.09684.58 ▲13.0054.31 ▼0.37
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.0399.80 ▼2.3645.75 ▲1.10
Inline Quotes /wp-admin/options-general.php?page=inline-stock-setting-admin8972.0028.3729.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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=inline-stock-setting-admin
    • > Notice in wp-content/plugins/inline-stock-quotes/inline-quotes.php+321
    Undefined index: service

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/inline-stock-quotes/inline-quotes.php:329

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: financial, finance, news, stock quotes, yahoo finance...

inline-stock-quotes/inline-quotes.php 92% from 13 tests

Analyzing the main PHP file in "Inline Stock Quotes" version 0.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("inline-stock-quotes.php" instead of "inline-quotes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin308 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18360308

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected