10% compare-your-income-moneyarcher

Code Review | Compare Your Income - MoneyArcher

WordPress plugin Compare Your Income - MoneyArcher scored10%from 54 tests.

About plugin

  • Plugin page: compare-your-inco...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2019
  • Latest release: Oct 4, 2019
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: moneyarcher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/config.php+114
    Invalid argument supplied for foreach()

Server metrics [RAM: ▲1.99MB] [CPU: ▲583.12ms] 50% from 4 tests

Server-side resources used by Compare Your Income - MoneyArcher
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 824.46ms on /wp-admin/admin.php?page=cyi-settings&tab=19)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 583.12ms on /wp-admin/admin.php?page=cyi-settings&tab=19)
PageMemory (MB)CPU Time (ms)
Home /5.04 ▲1.5854.39 ▲12.67
Dashboard /wp-admin5.79 ▲2.493,404.42 ▲3,352.52
Posts /wp-admin/edit.php5.52 ▲2.16845.88 ▲793.07
Add New Post /wp-admin/post-new.php7.99 ▲2.10829.10 ▲732.75
Media Library /wp-admin/upload.php5.35 ▲2.12829.12 ▲793.97
Compare [Five] /wp-admin/admin.php?page=cyi-settings&tab=65.91952.91
Compare [Thirteen] /wp-admin/admin.php?page=cyi-settings&tab=145.883,698.98
Compare [One] /wp-admin/admin.php?page=cyi-settings&tab=25.88753.91
Compare [Eight] /wp-admin/admin.php?page=cyi-settings&tab=95.88778.96
Compare [Ten] /wp-admin/admin.php?page=cyi-settings&tab=115.88782.91
Powered by website /wp-admin/admin.php?page=cyi-settings&tab=175.88866.89
Compare [Nine] /wp-admin/admin.php?page=cyi-settings&tab=105.88762.15
Compare [Twelve] /wp-admin/admin.php?page=cyi-settings&tab=135.88782.25
Compare [Eleven] /wp-admin/admin.php?page=cyi-settings&tab=125.88856.94
Options Object /wp-admin/admin.php?page=cyi-settings&tab=195.88824.46

Server storage [IO: ▲3.73MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Compare Your Income - MoneyArcher
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,118 ▲33213.44 ▼0.947.64 ▲5.4237.97 ▼3.66
Dashboard /wp-admin2,431 ▲2605.62 ▼0.0383.50 ▼8.2045.19 ▼0.41
Posts /wp-admin/edit.php2,274 ▲1741.97 ▲0.0237.91 ▼1.3834.62 ▼1.71
Add New Post /wp-admin/post-new.php1,673 ▲14722.71 ▼1.02618.77 ▼52.9259.76 ▼5.50
Media Library /wp-admin/upload.php1,574 ▲1744.15 ▼0.10104.94 ▼2.7542.95 ▼2.38
Compare [Five] /wp-admin/admin.php?page=cyi-settings&tab=67,0604.4685.3641.60
Compare [Thirteen] /wp-admin/admin.php?page=cyi-settings&tab=147,0664.4489.8439.59
Compare [One] /wp-admin/admin.php?page=cyi-settings&tab=27,0664.4387.1837.32
Compare [Eight] /wp-admin/admin.php?page=cyi-settings&tab=97,0634.4683.5438.30
Compare [Ten] /wp-admin/admin.php?page=cyi-settings&tab=117,0664.4184.1536.41
Powered by website /wp-admin/admin.php?page=cyi-settings&tab=177,0644.3680.8036.92
Compare [Nine] /wp-admin/admin.php?page=cyi-settings&tab=107,0664.4487.5835.99
Compare [Twelve] /wp-admin/admin.php?page=cyi-settings&tab=137,0634.3483.2035.59
Compare [Eleven] /wp-admin/admin.php?page=cyi-settings&tab=127,0664.4988.7837.79
Options Object /wp-admin/admin.php?page=cyi-settings&tab=197,0594.4482.8037.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • cyi-transients
    • theysaidso_admin_options
    • redux_version_upgraded_from
    • widget_recent-posts
    • can_compress_scripts
    • cyi

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=19
    • > Error in wp-includes/Requests/src/Exception/InvalidArgument.php+29
    Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in wp-includes/Requests/src/Exception/InvalidArgument.php:29
    Stack trace:
    #0 wp-includes/Requests/src/Cookie.php(84): WpOrg\Requests\Exception\InvalidArgument::create()
    #1 wp-includes/class-wp-http.php(472): WpOrg\Requests\Cookie->__construct()
    #2 wp-includes/class-wp-http.php(352): WP_Http::normalize_cookies()
    #3 wp-includes/http.php(150): WP_Http->request()
    #4 wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/class.p.php(230): wp_remote_request()
    #5 wp-includes/class-wp-hook.php(310): Redux_P->proxy()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin-ajax.php(188): d

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
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/class.p.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/themecheck/checks/embedded.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/templates/panel/footer.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/welcome/views/changelog.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/themecheck/checks/full_package.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/templates/panel/container.tpl.php:12
    • > PHP Warning
      Use of undefined constant CYI_PATH - assumed 'CYI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/compare-your-income-moneyarcher/bootstrap.php on line 7
    • > PHP Warning
      Use of undefined constant CYI_PATH - assumed 'CYI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/compare-your-income-moneyarcher/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/compare-your-income-moneyarcher/optionpanel/ReduxCore/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/compare-your-income-moneyarcher/display.php:77

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=19
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=19
    • > Network (severe)
    wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=6
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=6 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=14
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=14 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=2
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=2 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=9
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=9 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=11
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=11 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=10
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=10 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cyi-settings&tab=19
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cyi-settings&tab=19 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=663ff04a5d&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D663ff04a5d%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: income, moneyarcher, compare

compare-your-income-moneyarcher/init.php 92% from 13 tests

The principal PHP file in "Compare Your Income - MoneyArcher" v. 2.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("compare-your-income-moneyarcher.php" instead of "init.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin37,665 lines of code in 299 files:
LanguageFilesBlank linesComment linesLines of code
PHP1083,7305,34115,777
JavaScript872,6091,93412,115
Sass541,187607,580
SVG100934
JSON11840909
CSS471035297
LESS10053

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity32.53
▷ Minimum class complexity1.00
▷ Maximum class complexity883.00
Average method complexity6.57
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes00.00%
▷ Concrete classes102100.00%
▷ Final classes00.00%
Methods578
▷ Static methods10117.47%
▷ Public methods43775.61%
▷ Protected methods9115.74%
▷ Private methods508.65%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants60
▷ Global constants35.00%
▷ Class constants5795.00%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
30 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
optionpanel/ReduxCore/assets/img/2cl.png2.91KB0.24KB▼ 91.79%
optionpanel/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
optionpanel/ReduxCore/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%
optionpanel/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
optionpanel/ReduxCore/inc/fields/spinner/arrow_left.png0.15KB0.12KB▼ 16.67%