79% breview

Code Review | Breview for WooCommerce - Order completion review, multi-criteria rating and marketplace (Dokan) type reviews

WordPress plugin Breview for WooCommerce - Order completion review, multi-criteria rating and marketplace (Dokan) type reviews scored79%from 54 tests.

About plugin

  • Plugin page: breview
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Sep 14, 2023
  • Number of updates: 9
  • Update frequency: every 26.8 days
  • Top authors: mswebarts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.83ms] Passed 4 tests

A check of server-side resources used by Breview for WooCommerce - Order completion review, multi-criteria rating and marketplace (Dokan) type reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.78 ▼17.32
Dashboard /wp-admin3.32 ▲0.0248.82 ▲0.04
Posts /wp-admin/edit.php3.37 ▲0.0249.46 ▼3.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.34 ▼10.44
Media Library /wp-admin/upload.php3.25 ▲0.0243.81 ▲5.48
Multi Star-rating /wp-admin/admin.php?page=breview-multi-rating-settings3.1929.36
Style /wp-admin/admin.php?page=breview-style-settings3.1935.50
Breview /wp-admin/admin.php?page=breview-settings3.1930.01
MS Web Arts /wp-admin/admin.php?page=mswebarts-overview3.2432.50
Emails /wp-admin/admin.php?page=breview-email-settings3.1932.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Breview for WooCommerce - Order completion review, multi-criteria rating and marketplace (Dokan) type reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲19613.46 ▼0.9512.74 ▲11.0143.79 ▼4.33
Dashboard /wp-admin2,216 ▲365.71 ▲0.1888.51 ▼4.8085.07 ▲44.22
Posts /wp-admin/edit.php2,130 ▲481.98 ▼0.0536.43 ▼3.1135.40 ▼0.33
Add New Post /wp-admin/post-new.php1,708 ▲18222.39 ▼0.63738.37 ▲86.6660.57 ▼0.66
Media Library /wp-admin/upload.php1,433 ▲334.24 ▲0.10107.93 ▼4.3151.37 ▲3.43
Multi Star-rating /wp-admin/admin.php?page=breview-multi-rating-settings8062.1427.4924.33
Style /wp-admin/admin.php?page=breview-style-settings7882.0327.3624.76
Breview /wp-admin/admin.php?page=breview-settings8072.1425.7824.11
MS Web Arts /wp-admin/admin.php?page=mswebarts-overview9212.1424.1544.82
Emails /wp-admin/admin.php?page=breview-email-settings8031.9923.7124.99

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=breview-multi-rating-settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msbr_breview_multi_rating_settings_page' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=breview-style-settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msbr_breview_style_settings_page' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=breview-settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msbr_breview_general_settings_page' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=breview-email-settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msbr_breview_email_settings_page' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 54× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function mailer() on null in wp-content/plugins/breview/templates/emails/completed.php:23
    • > PHP Warning
      include_once(inc/functions/hooks-actions.php): failed to open stream: No such file or directory in wp-content/plugins/breview/inc/init.php on line 10
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/breview/templates/product/add-review-popup-product.php on line 16
    • > PHP Warning
      include_once(): Failed opening 'inc/functions/hooks-actions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/breview/inc/init.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'inc/functions/review-form.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/breview/inc/init.php on line 9
    • > PHP Warning
      include_once(inc/classes/class-msbr-template-loader.php): failed to open stream: No such file or directory in wp-content/plugins/breview/inc/init.php on line 16
    • > PHP Notice
      Trying to get property 'order' of non-object in wp-content/plugins/breview/templates/emails/completed.php on line 19
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/breview/templates/emails/completed.php on line 19
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/breview/templates/emails/completed.php on line 20
    • > PHP Warning
      include_once(): Failed opening 'inc/admin/options-panel/options-panel.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/breview/inc/init.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: breview, woocommerce, review, marketplace, order...

breview/breview.php Passed 13 tests

"Breview for WooCommerce - Order completion review, multi-criteria rating and marketplace (Dokan) type reviews" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
103 characters long description:
The way reviews should be handled in every WooCommerce websites just like the traditional marketplaces.

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
Good job! No executable or dangerous file extensions detected2,705 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP192654011,540
CSS72443983
JavaScript91972180
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods337.50%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/logo.png2.93KB1.65KB▼ 43.70%
inc/admin/assets/images/trustpilot-logo.png3.28KB2.28KB▼ 30.46%
inc/admin/assets/images/icon.png1.43KB0.69KB▼ 51.71%