10% bsecure-give

Code Review | bSecure for GiveWP

WordPress plugin bSecure for GiveWP scored10%from 54 tests.

About plugin

  • Plugin page: bsecure-give
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2023
  • Latest release: Jun 21, 2023
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: bsecuretech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /299 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User error in wp-content/plugins/bsecure-give/bsecure-give.php+613
    bSecure Give plugin required Give plugin to be installed and activate.

Server metrics [RAM: ▲0.17MB] [CPU: ▼8.13ms] Passed 4 tests

Server-side resources used by bSecure for GiveWP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1837.40 ▼1.92
Dashboard /wp-admin3.48 ▲0.1354.81 ▼7.08
Posts /wp-admin/edit.php3.59 ▲0.2447.90 ▲1.42
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.18 ▼24.08
Media Library /wp-admin/upload.php3.40 ▲0.1736.39 ▲0.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

bSecure for GiveWP: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.58 ▼0.591.59 ▼0.1141.27 ▼3.28
Dashboard /wp-admin2,208 ▲205.81 ▲0.7896.22 ▼22.0741.44 ▼5.62
Posts /wp-admin/edit.php2,091 ▼12.06 ▲0.0538.67 ▲2.7935.69 ▼0.94
Add New Post /wp-admin/post-new.php1,544 ▲818.20 ▼0.23634.76 ▲12.9869.88 ▲12.09
Media Library /wp-admin/upload.php1,393 ▲114.25 ▲0.08101.02 ▲2.5443.39 ▼1.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Bsecure_Give' not found in wp-content/plugins/bsecure-give/includes/class-bsecure-give-functions.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bsecure-give/bsecure-give.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires php: Version format is invalid
Please take inspiration from this readme.txt

bsecure-give/bsecure-give.php Passed 13 tests

The entry point to "bSecure for GiveWP" version 1.0.0 is a PHP file that has certain tags in its header comment area
39 characters long description:
Multiple Payment Gateways in one place.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,535 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP45442291,071
CSS21870223
SVG610159
JavaScript2341182

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity43.50
▷ Minimum class complexity15.00
▷ Maximum class complexity72.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/edit-icon.png0.25KB0.23KB▼ 6.32%
assets/images/qpLogo-2.png1.87KB1.53KB▼ 17.83%
assets/images/qpLogo-1.png0.98KB0.83KB▼ 14.71%
assets/images/popup-close.png0.34KB0.25KB▼ 27.76%
assets/images/qisst-pay.png1.35KB1.42KB0.00%