84% list-sp-500-constituents-financials

Code Review | List the S&P 500 Constituents Financials

WordPress plugin List the S&P 500 Constituents Financials scored84%from 54 tests.

About plugin

  • Plugin page: list-sp-500-const...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 19, 2021
  • Latest release: Aug 24, 2023
  • Number of updates: 7
  • Update frequency: every 135.4 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.47ms] Passed 4 tests

Server-side resources used by List the S&P 500 Constituents Financials
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1042.23 ▲6.49
Dashboard /wp-admin3.46 ▲0.1248.41 ▼12.04
Posts /wp-admin/edit.php3.52 ▲0.1646.31 ▼4.12
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.19 ▼9.35
Media Library /wp-admin/upload.php3.33 ▲0.0935.11 ▼0.36
Settings S&P 500 /wp-admin/options-general.php?page=settings_snp500_item3.3032.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by List the S&P 500 Constituents Financials
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲16614.44 ▼0.0225.42 ▲23.5448.30 ▲4.15
Dashboard /wp-admin2,211 ▲375.64 ▲0.1094.94 ▲7.2142.11 ▼1.69
Posts /wp-admin/edit.php2,113 ▲132.01 ▲0.0535.45 ▼0.8431.96 ▼3.32
Add New Post /wp-admin/post-new.php1,538 ▲1023.73 ▲0.51681.75 ▲22.8656.49 ▲1.98
Media Library /wp-admin/upload.php1,413 ▲134.21 ▼0.03107.67 ▲11.7647.91 ▲5.42
Settings S&P 500 /wp-admin/options-general.php?page=settings_snp500_item9302.1425.5729.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 7 options in the database
    • mxsapc_columns
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/list-sp-500-constituents-financials/includes/admin/views/sub-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/list-sp-500-constituents-financials/includes/admin/views/hidemenu-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/list-sp-500-constituents-financials/includes/admin/views/settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/list-sp-500-constituents-financials/includes/admin/views/main-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
6 plugin tags: shares, investment, stocks, sp500, s and p 500...

list-sp-500-constituents-financials/list-sp-500-constituents-financials.php Passed 13 tests

The principal PHP file in "List the S&P 500 Constituents Financials" v. 1.3 is loaded by WordPress automatically on each request
48 characters long description:
The plugin display the list of S&P 500 companies

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected4,052 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS50202,228
PHP306743951,041
SVG100685
JavaScript5501965
PO File18833

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.32
Average class complexity4.32
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes14.76%
Methods64
▷ Static methods1726.56%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin