84% my-net-worth

Code Review | My Net Worth

WordPress plugin My Net Worth scored84%from 54 tests.

About plugin

  • Plugin page: my-net-worth
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2014
  • Latest release: May 4, 2023
  • Number of updates: 21
  • Update frequency: every 153.7 days
  • Top authors: NetworthShare (85.71%)madskyllz (19.05%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.29ms] Passed 4 tests

An overview of server-side resources used by My Net Worth
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.52 ▼0.88
Dashboard /wp-admin3.33 ▼0.0143.68 ▼17.38
Posts /wp-admin/edit.php3.39 ▲0.0346.27 ▼0.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0286.31 ▼18.05
Media Library /wp-admin/upload.php3.26 ▲0.0335.30 ▲1.71
My Net Worth /wp-admin/options-general.php?page=wp_my_plugin3.2229.95

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
username
db_upgraded
widget_theysaidso_widget
widget_wp_my_plugin
widget_recent-comments
entrycount

Browser metrics Passed 4 tests

A check of browser resources used by My Net Worth
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.18 ▼0.221.52 ▲0.0237.48 ▲0.14
Dashboard /wp-admin2,196 ▲165.59 ▼0.0592.60 ▲3.4037.68 ▼8.05
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0439.42 ▲1.8535.99 ▲3.95
Add New Post /wp-admin/post-new.php1,529 ▼622.97 ▲4.84695.84 ▲48.3351.69 ▼10.66
Media Library /wp-admin/upload.php1,398 ▼54.20 ▼0.0093.32 ▼10.4241.15 ▼6.16
My Net Worth /wp-admin/options-general.php?page=wp_my_plugin8092.0325.9126.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wp_my_plugin
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/my-net-worth/options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-net-worth/my-net-worth.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: No tags were detected
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

my-net-worth/my-net-worth.php Passed 13 tests

The main PHP script in "My Net Worth" version 2.0 is automatically included on every request by WordPress
71 characters long description:
This widget displays a live chart of your Net Worth from NetworthShare.

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
Everything looks great! No dangerous files found in this plugin100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23337100

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin