84% business-review

Code Review | Business Review Block

WordPress plugin Business Review Block scored84%from 54 tests.

About plugin

  • Plugin page: business-review
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Nov 19, 2023
  • Number of updates: 71
  • Update frequency: every 3.7 days
  • Top authors: btechnologies (91.55%)abuhayat (9.86%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.82ms] Passed 4 tests

Server-side resources used by Business Review Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.82 ▼1.33
Dashboard /wp-admin3.41 ▲0.1145.80 ▼5.52
Posts /wp-admin/edit.php3.53 ▲0.1749.87 ▲3.33
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.12 ▼15.76
Media Library /wp-admin/upload.php3.33 ▲0.1044.64 ▲13.44
Business Review /wp-admin/admin.php?page=business-review3.2935.15

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

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

Browser metrics Passed 4 tests

Business Review Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4614.31 ▲0.021.79 ▲0.1239.55 ▼4.73
Dashboard /wp-admin2,195 ▲155.55 ▼0.1491.93 ▲1.9041.53 ▲1.99
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0040.35 ▼1.3736.11 ▼2.93
Add New Post /wp-admin/post-new.php1,678 ▲15225.00 ▲1.67662.48 ▲64.1036.56 ▼17.39
Media Library /wp-admin/upload.php1,403 ▲94.19 ▲0.01102.30 ▲2.0540.19 ▼2.86
Business Review /wp-admin/admin.php?page=business-review7982.3855.7727.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • brp-redirect
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function can_use_premium_feature() on null in wp-content/plugins/business-review/custom-post.php:8
    • > PHP Warning
      Use of undefined constant GRBB_PLUGIN_VERSION - assumed 'GRBB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/business-review/dist/editor.asset.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/business-review/bplugins_sdk/inc/Base/License.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/business-review/bplugins_sdk/inc/Base/Activate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-review/api/BusinessReviewAPI.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

business-review/index.php 92% from 13 tests

The main file in "Business Review Block" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("business-review.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,084 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP1216743759
JavaScript177128489
JSON400383
PO File28590201
Sass3115184
CSS64850
SVG21018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity3.00
▷ Maximum class complexity27.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods5396.36%
▷ Protected methods00.00%
▷ Private methods23.64%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bplugins_sdk/dist/assets/images/shield_success.png3.47KB3.61KB0.00%