89% bp-custom-functionalities

Code Review | BP Custom Functionalities

WordPress plugin BP Custom Functionalities scored89%from 54 tests.

About plugin

  • Plugin page: bp-custom-functio...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Oct 8, 2019
  • Number of updates: 21
  • Update frequency: every 17.3 days
  • Top authors: prashantvatsh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,678 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
Installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼12.24ms] Passed 4 tests

A check of server-side resources used by BP Custom Functionalities
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6120.33 ▼19.61
Dashboard /wp-admin3.33 ▲0.0346.78 ▼0.86
Posts /wp-admin/edit.php3.19 ▼0.1631.12 ▼15.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.58 ▼12.72
Media Library /wp-admin/upload.php3.25 ▲0.0235.28 ▲2.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BP Custom Functionalities
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,460 ▼28613.47 ▼1.090.54 ▼1.1218.63 ▼20.65
Dashboard /wp-admin2,210 ▲194.89 ▼0.92100.04 ▼0.6839.38 ▲0.07
Posts /wp-admin/edit.php45 ▼2,0440.44 ▼1.540.06 ▼39.049.35 ▼27.19
Add New Post /wp-admin/post-new.php1,524 ▼423.19 ▲5.04656.71 ▲69.0569.53 ▲12.10
Media Library /wp-admin/upload.php1,395 ▲74.35 ▲0.14101.53 ▲4.8446.38 ▲1.60

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

bp-custom-functionalities/loader.php 85% from 13 tests

"BP Custom Functionalities" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 247 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bp-custom-functionalities.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin219 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24115219

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
BP Custom Functionalities.png67.10KB20.35KB▼ 69.67%