90% bp-gifts

Code Review | BP Gifts

WordPress plugin BP Gifts scored 90% from 54 tests.

About plugin

  • Plugin page: bp-gifts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Sep 1, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: suiteplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.87ms] Passed 4 tests

A check of server-side resources used by BP Gifts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.03 ▼10.58
Dashboard /wp-admin3.35 ▲0.0551.83 ▲0.84
Posts /wp-admin/edit.php3.46 ▲0.1147.20 ▼0.85
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.74 ▼4.88
Media Library /wp-admin/upload.php3.27 ▲0.0435.55 ▲1.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BP Gifts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.28 ▼1.081.80 ▼0.1243.25 ▼2.15
Dashboard /wp-admin2,216 ▲255.89 ▲0.04110.75 ▲4.7344.59 ▲1.54
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0637.06 ▲1.0133.11 ▼3.39
Add New Post /wp-admin/post-new.php1,419 ▼11417.90 ▼5.40571.72 ▼94.4942.33 ▼6.54
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.02102.00 ▲0.4642.12 ▼2.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #2 is missing in bp-gifts/assets to your readme.txt
Please take inspiration from this readme.txt

bp-gifts/bp-gifts.php Passed 13 tests

The main PHP script in "BP Gifts" version 1.0.0 is automatically included on every request by WordPress
58 characters long description:
Enable users to share gifts with other users in BuddyPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,523 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32193071,153
PHP212147328
PO File1131342

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin