62% economic-market-news

Code Review | Economic & Market News

WordPress plugin Economic & Market News scored62%from 54 tests.

About plugin

  • Plugin page: economic-market-news
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Nov 1, 2023
  • Number of updates: 16
  • Update frequency: every 76.6 days
  • Top authors: stockdio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,077 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼31.43ms] Passed 4 tests

This is a short check of server-side resources used by Economic & Market News
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.59 ▲0.71
Dashboard /wp-admin3.04 ▼0.3026.36 ▼31.27
Posts /wp-admin/edit.php3.04 ▼0.3125.39 ▼21.95
Add New Post /wp-admin/post-new.php3.04 ▼2.8424.40 ▼64.02
Media Library /wp-admin/upload.php3.04 ▼0.1825.74 ▼8.49
Economic & Market News /wp-admin/options-general.php?page=stockdio-economic-news-board-settings-config3.0524.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_widget_stockdio_market_economic_news
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Economic & Market News
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲13816.91 ▲2.622.13 ▲0.3737.79 ▼6.59
Dashboard /wp-admin2,260 ▲827.70 ▲1.98219.55 ▲109.6142.82 ▼1.44
Posts /wp-admin/edit.php2,187 ▲907.40 ▲5.4367.69 ▲31.4131.12 ▼3.89
Add New Post /wp-admin/post-new.php6,390 ▲4,86423.47 ▲0.40915.35 ▲197.5339.73 ▼18.00
Media Library /wp-admin/upload.php1,538 ▲1389.09 ▲4.85123.06 ▲5.0040.79 ▼6.91
Economic & Market News /wp-admin/options-general.php?page=stockdio-economic-news-board-settings-config8876.9163.9226.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/economic-market-news/stockdio_economic_news_stockdioplugin.php+115
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_widget_stockdio_market_economic_news
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stockdio-economic-news-board-settings-config
    • > Notice in wp-content/plugins/economic-market-news/stockdio_economic_news_stockdioplugin.php+38
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/economic-market-news/stockdio_economic_news_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/economic-market-news/stockdio_economic_news_overview_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/economic-market-news/stockdio_economic_news_activate_plugin_admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/economic-market-news/stockdio_economic_news_stockdioplugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (22 tag instead of maximum 10)
You can look at the official readme.txt

economic-market-news/stockdio_economic_news_stockdioplugin.php 92% from 13 tests

"Economic & Market News" version 1.0.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("economic-market-news.php" instead of "stockdio_economic_news_stockdioplugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin4,305 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5200511,870
PHP52321131,316
CSS590281,109
SVG11010

PHP code Passed 2 tests

Analyzing 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.55
Average class complexity88.50
▷ Minimum class complexity69.00
▷ Maximum class complexity108.00
Average method complexity5.61
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods513.16%
▷ Public methods38100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/stockdio-logo-full-light.png11.00KB5.38KB▼ 51.07%
assets/stockdio-logo-full-dark.png14.07KB5.39KB▼ 61.70%