10% modify-profile-fields-dashboard-menu-buttons

Code Review | Profile & Dashboard fields [Modify/Disable/Remove]

WordPress plugin Profile & Dashboard fields [Modify/Disable/Remove] scored10%from 54 tests.

About plugin

  • Plugin page: modify-profile-fi...
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Apr 16, 2020
  • Latest release: Jul 31, 2022
  • Number of updates: 23
  • Update frequency: every 36.4 days
  • Top authors: ttodua (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /2,563 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/modify-profile-fields-dashboard-menu-buttons/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/modify-profile-fields-dashboard-menu-buttons/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/modify-profile-fields-dashboard-menu-buttons/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲2.24MB] [CPU: ▲8.72ms] Passed 4 tests

Server-side resources used by Profile & Dashboard fields [Modify/Disable/Remove]
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.75 ▲2.2951.78 ▲15.74
Dashboard /wp-admin5.58 ▲2.2856.39 ▲5.40
Posts /wp-admin/edit.php5.63 ▲2.2757.72 ▲8.22
Add New Post /wp-admin/post-new.php8.10 ▲2.2192.31 ▲5.51
Media Library /wp-admin/upload.php5.44 ▲2.2155.08 ▲21.74
Modify Profile Fields /wp-admin/options-general.php?page=modify-profile-dashboard-fields5.4148.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_modify_profile_dashboard_fields__errors_log
New WordPress options
widget_recent-posts
db_upgraded
modify-profile-dashboard-fields
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Profile & Dashboard fields [Modify/Disable/Remove]
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.001.58 ▼0.1237.57 ▼3.33
Dashboard /wp-admin2,205 ▲255.62 ▼0.0583.34 ▼1.8836.28 ▼0.22
Posts /wp-admin/edit.php2,104 ▼01.98 ▼0.0233.31 ▼9.1134.65 ▼2.50
Add New Post /wp-admin/post-new.php1,531 ▼623.47 ▼1.24679.32 ▲48.2759.93 ▼17.25
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.05108.69 ▲5.5547.21 ▲2.74
Modify Profile Fields /wp-admin/options-general.php?page=modify-profile-dashboard-fields1,4082.1329.0979.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_modify_profile_dashboard_fields__errors_log
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • modify-profile-dashboard-fields
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/modify-profile-fields-dashboard-menu-buttons/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

modify-profile-fields-dashboard-menu-buttons/index.php 85% from 13 tests

"Profile & Dashboard fields [Modify/Disable/Remove]" version 1.04's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("modify-profile-fields-dashboard-menu-buttons.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,832 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,2915,1233,832

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity356.60
▷ Minimum class complexity21.00
▷ Maximum class complexity1,076.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods877
▷ Static methods10211.63%
▷ Public methods86999.09%
▷ Protected methods00.00%
▷ Private methods80.91%
Functions91
▷ Named functions00.00%
▷ Anonymous functions91100.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin