84% bp-profile-field-duplicator

Code Review | BuddyPress Profile Field Duplicator

WordPress plugin BuddyPress Profile Field Duplicator scored 84% from 54 tests.

About plugin

  • Plugin page: bp-profile-field-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 6.3.1
  • First release: May 26, 2019
  • Latest release: Oct 6, 2019
  • Number of updates: 10
  • Update frequency: every 13.3 days
  • Top authors: bhargavbhandari90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 919 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.36ms] Passed 4 tests

An overview of server-side resources used by BuddyPress Profile Field Duplicator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.20 ▼5.94
Dashboard /wp-admin3.34 ▲0.0443.92 ▼5.00
Posts /wp-admin/edit.php3.39 ▲0.0344.78 ▼2.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.12 ▼0.37
Media Library /wp-admin/upload.php3.26 ▲0.0333.95 ▲0.73

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Profile Field Duplicator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.74 ▲0.061.85 ▼0.4044.27 ▼7.30
Dashboard /wp-admin2,207 ▲194.82 ▼1.03100.91 ▼14.2039.19 ▼5.09
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0540.51 ▲2.9136.40 ▲2.24
Add New Post /wp-admin/post-new.php1,537 ▼223.31 ▲0.17623.04 ▼60.4572.59 ▲13.68
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.0896.49 ▼19.0243.67 ▼5.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-profile-field-duplicator/bp-profile-field-duplicator.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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 require attention:
  • Screenshots: Please add an image for screenshot #1 (Duplicate any profile field by clicking on "Duplicate This" button screenshot-1.jpg.)
You can take inspiration from this readme.txt

bp-profile-field-duplicator/bp-profile-field-duplicator.php Passed 13 tests

"BuddyPress Profile Field Duplicator" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Make a duplicate of BuddyPress profile fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected624 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript676195426
PHP26488162
PO File17936

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected