84% bp-profile-field-repeater

Code Review | Profile Field Repeater

WordPress plugin Profile Field Repeater scored84%from 54 tests.

About plugin

  • Plugin page: bp-profile-field-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.3
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: Apr 10, 2022
  • Number of updates: 6
  • Update frequency: every 115.0 days
  • Top authors: bhargavbhandari90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /913 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.84ms] Passed 4 tests

Server-side resources used by Profile Field Repeater
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.71 ▼2.18
Dashboard /wp-admin3.36 ▲0.0244.51 ▼13.51
Posts /wp-admin/edit.php3.48 ▲0.1247.76 ▼4.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0679.42 ▼13.84
Media Library /wp-admin/upload.php3.29 ▲0.0633.62 ▼3.81

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Profile Field Repeater
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.74 ▲0.392.02 ▲0.3741.83 ▲2.57
Dashboard /wp-admin2,210 ▲194.88 ▼1.17108.07 ▲7.6038.58 ▼2.27
Posts /wp-admin/edit.php2,095 ▲92.01 ▲0.0340.27 ▲5.2037.61 ▲2.98
Add New Post /wp-admin/post-new.php1,540 ▲1223.34 ▲4.90652.80 ▼35.0751.47 ▲0.37
Media Library /wp-admin/upload.php1,389 ▲44.22 ▲0.0695.20 ▼24.5741.06 ▼22.38

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-profile-field-repeater/bp-profile-field-repeater.php:31

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Option to set field as repeater screenshot-1.jpg.), #2 (Field set as repeater in backend screenshot-2.jpg.), #3 (Field set as repeater in user profile screenshot-3.jpg.)
You can take inspiration from this readme.txt

bp-profile-field-repeater/bp-profile-field-repeater.php 92% from 13 tests

"Profile Field Repeater" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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
No dangerous file extensions were detected389 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4128197273
PO File191242
JavaScript117738
Markdown113033
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity20.00
▷ Minimum class complexity12.00
▷ Maximum class complexity28.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin