72% mif-bp-customizer

Code Review | MIF BP Customizer

WordPress plugin MIF BP Customizer scored72%from 54 tests.

About plugin

  • Plugin page: mif-bp-customizer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Mar 26, 2018
  • Number of updates: 6
  • Update frequency: every 7.8 days
  • Top authors: asergeev34 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,161 total downloads

Benchmarks

Plugin footprint 83% 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: ▲1.69MB] [CPU: ▲4.60ms] Passed 4 tests

A check of server-side resources used by MIF BP Customizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.2040.02 ▼2.06
Dashboard /wp-admin5.17 ▲1.8664.00 ▲9.35
Posts /wp-admin/edit.php5.22 ▲1.8668.00 ▲16.82
Add New Post /wp-admin/post-new.php7.77 ▲1.8897.15 ▼5.71
Media Library /wp-admin/upload.php5.09 ▲1.8662.60 ▲24.47
User blockings /wp-admin/users.php?page=banned-members5.1146.98
BP Customizer /wp-admin/options-general.php?page=mif-bpc5.0653.40

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 112 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
recovery_mode_email_last_sent
db_upgraded
widget_mif_bpc_groups_widget
can_compress_scripts
widget_mif_bpc_members_widget
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by MIF BP Customizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,610 ▼15113.61 ▼0.769.78 ▲7.8413.14 ▼32.42
Dashboard /wp-admin2,211 ▲374.88 ▼0.7691.87 ▲1.2039.70 ▼1.45
Posts /wp-admin/edit.php2,122 ▲222.26 ▲0.2539.16 ▲2.2134.67 ▼2.64
Add New Post /wp-admin/post-new.php1,534 ▲823.33 ▲5.82600.74 ▼30.3161.57 ▲5.74
Media Library /wp-admin/upload.php1,425 ▲284.37 ▲0.17104.03 ▼0.3550.51 ▲3.58
User blockings /wp-admin/users.php?page=banned-members7031.6711.3323.05
BP Customizer /wp-admin/options-general.php?page=mif-bpc1,0771.8830.9036.17

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
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_mif_bpc_members_widget
    • recovery_mode_email_last_sent
    • widget_mif_bpc_groups_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=banned-members
    • > User notice in wp-includes/functions.php+5905
    Function WP_Object_Cache::add was called incorrectly. Cache key must be an integer or a non-empty string, array given. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)
    • > GET request to /wp-admin/users.php?page=banned-members
    • > Error in wp-content/plugins/mif-bp-customizer/inc/banned-users-admin.php+45
    Uncaught Error: Call to undefined function bp_has_members() in wp-content/plugins/mif-bp-customizer/inc/banned-users-admin.php:45
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): mif_bpc_admin_banned_members->page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/users.php(11): require_once('/var/www/wordpr...')
    #5 {main}
    thrown
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mif-bpc
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mif-bp-customizer/templates/notifications-loop.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mif-bp-customizer/templates/dialogues-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mif-bp-customizer/templates/docs-page-doc.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mif-bp-customizer/templates/docs-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mif_bpc_repost_activity_user_link() in wp-content/plugins/mif-bp-customizer/templates/repost-activity.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=mif-bpc
    • > Network (severe)
    https://www.paypalobjects.com/ru_RU/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
  • Screenshots: These screenshots do not have images: #1 (Plugin configuration page), #2 ("Like", "Favorite", "Repost" buttons, activity feed configuration menu), #3 (Subscription and access restriction menu on user page), #4 (Repost-post), #5 (Configuration of displayed posts), #6 (Access restriction to your page), #7 (User documents), #8 (Pop-up notifications), #9 (Dialogues)
The official readme.txt is a good inspiration

mif-bp-customizer/mif-bp-customizer.php 92% from 13 tests

The entry point to "MIF BP Customizer" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin34,461 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript226,2626,74418,716
PHP415,1341,9987,372
CSS94592494,602
SVG1002,671
PO File1294315735
HTML1631261
JSON10074
Bourne Shell112630

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity38.00
▷ Minimum class complexity1.00
▷ Maximum class complexity261.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods434
▷ Static methods71.61%
▷ Public methods43299.54%
▷ Protected methods00.00%
▷ Private methods20.46%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 1.30MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-6.png70.90KB36.51KB▼ 48.50%
js/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
js/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
screenshot-1.png74.62KB42.32KB▼ 43.29%