62% cimy-user-extra-fields

Code Review | Cimy User Extra Fields

WordPress plugin Cimy User Extra Fields scored 62% from 54 tests.

About plugin

  • Plugin page: cimy-user-extra-f...
  • Plugin version: 2.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.7
  • WordPress version: 5.9.2
  • First release: Jun 25, 2007
  • Latest release: May 10, 2017
  • Number of updates: 586
  • Update frequency: every 6.3 days
  • Top authors: Cimmo (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

9,000+ active / 340,352 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.98MB] [CPU: ▼301.69ms] Passed 4 tests

This is a short check of server-side resources used by Cimy User Extra Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.6964.90 ▲8.80
Dashboard /wp-admin4.60 ▲1.2044.88 ▼32.24
Posts /wp-admin/edit.php4.67 ▲1.0349.27 ▲6.37
Add New Post /wp-admin/post-new.php7.97 ▲1.01104.25 ▼1,189.67
Media Library /wp-admin/upload.php4.60 ▲1.3144.06 ▲14.35
Cimy User Extra Fields /wp-admin/options-general.php?page=user_extra_fields4.6041.86
Users Extended /wp-admin/users.php?page=users_extended4.6171.47

Server storage [IO: ▲3.45MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/cimy-user-extra-fields/" and "wp-content/uploads/"
    • (new file) wp-content/Cimy_User_Extra_Fields/.empty
Filesystem: 145 new files
Database: 3 new tables, 1 new option
New tables
wp_cimy_uef_wp_fields
wp_cimy_uef_fields
wp_cimy_uef_data
New WordPress options
cimy_uef_options

Browser metrics Passed 4 tests

Checking browser requirements for Cimy User Extra Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,759 ▲1515.62 ▼0.125.99 ▼0.172.27 ▼0.01
Dashboard /wp-admin2,888 ▲276.13 ▼0.10115.65 ▼18.90154.53 ▼14.90
Posts /wp-admin/edit.php2,698 ▲103.24 ▼0.1370.76 ▲5.05144.56 ▼36.00
Add New Post /wp-admin/post-new.php1,672 ▼1820.39 ▲1.93428.45 ▲21.19161.21 ▲7.21
Media Library /wp-admin/upload.php1,708 ▲105.47 ▼0.01148.86 ▲7.29188.62 ▲11.99
Cimy User Extra Fields /wp-admin/options-general.php?page=user_extra_fields2,8522.5358.92215.09
Users Extended /wp-admin/users.php?page=users_extended1,2512.4355.14110.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_cimy_uef_fields
    • wp_cimy_uef_wp_fields
    • wp_cimy_uef_data
  • Zombie WordPress options detected upon uninstall: 1 option
    • cimy_uef_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=users_extended
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=users_extended
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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 take a closer look at the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cimy-user-extra-fields/securimage/securimage_show_captcha.php
    • > /wp-content/plugins/cimy-user-extra-fields/securimage/example_form.php
    • > /wp-content/plugins/cimy-user-extra-fields/securimage/securimage_show.php
    • > /wp-content/plugins/cimy-user-extra-fields/securimage/example_form.ajax.php
    • > /wp-content/plugins/cimy-user-extra-fields/securimage/securimage_play.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:47
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php on line 43
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cimy-user-extra-fields/cimy_uef_mu_activation.php on line 27
    • > PHP Warning
      opendir(wp-content/plugins/cimy-user-extra-fields/securimage/audio/noise/): failed to open dir: No such file or directory in /var/www/wordpress/wp-content/plugins/cimy-user-extra-fields/securimage/securimage.php on line 3005
    • > PHP Warning
      constant(): Couldn't find constant VHOST in wp-content/plugins/cimy-user-extra-fields/cimy_uef_mu_activation.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Registration form with extra fields), #2 (User's profile with extra fields), #3 (Main options page), #4 (Add a new field form)
You can take inspiration from this readme.txt

cimy-user-extra-fields/cimy_user_extra_fields.php 92% from 13 tests

The main PHP file in "Cimy User Extra Fields" ver. 2.7.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cimy-user-extra-fields.php" instead of "cimy_user_extra_fields.php")

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
Good job! No executable or dangerous file extensions detected22,543 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PO File174,7137,06412,288
PHP192,2142,5879,500
JavaScript76635400
Markdown1690175
CSS67098
HTML2262982

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity81.88
▷ Minimum class complexity1.00
▷ Maximum class complexity360.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods136
▷ Static methods96.62%
▷ Public methods8562.50%
▷ Protected methods5137.50%
▷ Private methods00.00%
Functions115
▷ Named functions115100.00%
▷ Anonymous functions00.00%
Constants52
▷ Global constants611.54%
▷ Class constants4688.46%
▷ Public constants46100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.32MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png81.82KB29.74KB▼ 63.66%
securimage/images/audio_icon.png1.64KB2.04KB0.00%
screenshot-4.png75.55KB25.29KB▼ 66.52%
securimage/images/refresh.png4.72KB2.44KB▼ 48.36%
securimage/backgrounds/bg6.png41.88KB29.04KB▼ 30.64%