68% bhindb

Code Review | BhinDB, Bhinneka Database for Bhinneka Affiliates Plugin

WordPress plugin BhinDB, Bhinneka Database for Bhinneka Affiliates Plugin scored68%from 54 tests.

About plugin

  • Plugin page: bhindb
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.0
  • WordPress version: 6.3.1
  • First release: May 11, 2013
  • Latest release: Sep 17, 2014
  • Number of updates: 23
  • Update frequency: every 21.5 days
  • Top authors: danif98 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.63MB] [CPU: ▼34.72ms] Passed 4 tests

This is a short check of server-side resources used by BhinDB, Bhinneka Database for Bhinneka Affiliates Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2643.81 ▲2.41
Dashboard /wp-admin3.31 ▲0.0126.40 ▼31.36
Posts /wp-admin/edit.php3.31 ▼0.0525.53 ▼24.53
Add New Post /wp-admin/post-new.php3.31 ▼2.5823.66 ▼70.02
Media Library /wp-admin/upload.php3.31 ▲0.0823.75 ▼12.97
BhinDB /wp-admin/options-general.php?page=bhindb3.3230.62

Server storage [IO: ▲0.19MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for BhinDB, Bhinneka Database for Bhinneka Affiliates Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.072.09 ▲0.3538.43 ▼6.37
Dashboard /wp-admin2,210 ▲224.87 ▼0.0598.30 ▼21.3038.83 ▼9.01
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0733.19 ▼8.4234.37 ▼3.62
Add New Post /wp-admin/post-new.php1,545 ▲1217.98 ▼5.09648.40 ▼43.1556.88 ▲4.87
Media Library /wp-admin/upload.php1,386 ▼24.19 ▲0.0897.40 ▼7.1842.85 ▼0.19
BhinDB /wp-admin/options-general.php?page=bhindb9702.1423.1235.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bhindb
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=bhindb
    • > Notice in wp-content/plugins/bhindb/bhindb.php+224
    Undefined index: bhindb_updated

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bhindb/bhindb.php:314

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Products in 1 column), #2 (Products in 2 columns), #3 (Products in 3 columns)
Please take inspiration from this readme.txt

bhindb/bhindb.php 92% from 13 tests

This is the main PHP file of "BhinDB, Bhinneka Database for Bhinneka Affiliates Plugin" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 168 characters long)

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
Good job! No executable or dangerous file extensions detected1,522 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22282871,522

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity163.50
▷ Minimum class complexity130.00
▷ Maximum class complexity197.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
There were not PNG files found in your plugin