78% rating-bws

Code Review | Rating by BestWebSoft

WordPress plugin Rating by BestWebSoft scored 78% from 54 tests.

About plugin

  • Plugin page: rating-bws
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Aug 15, 2023
  • Number of updates: 24
  • Update frequency: every 102.0 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 8,821 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.09MB] [CPU: ▲3.57ms] Passed 4 tests

A check of server-side resources used by Rating by BestWebSoft
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.09 ▲4.90
Dashboard /wp-admin3.38 ▲0.0856.40 ▲7.51
Posts /wp-admin/edit.php3.50 ▲0.1448.98 ▲5.76
Add New Post /wp-admin/post-new.php5.99 ▲0.1189.83 ▲0.07
Media Library /wp-admin/upload.php3.30 ▲0.0736.12 ▲3.54

Server storage [IO: ▲6.15MB] [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: 127 new files
Database: 1 new table, 8 new options
New tables
wp_bws_rating
New WordPress options
theysaidso_admin_options
widget_recent-comments
bstwbsftwppdtplgns_options
rtng_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rating by BestWebSoft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,146 ▲41113.78 ▼0.866.19 ▲4.5842.13 ▼4.14
Dashboard /wp-admin2,461 ▲2725.00 ▼0.91114.20 ▲5.9843.27 ▲2.74
Posts /wp-admin/edit.php2,351 ▲2622.24 ▲0.2634.86 ▲0.1631.41 ▼0.37
Add New Post /wp-admin/post-new.php6,723 ▲5,20920.44 ▲2.76916.94 ▲244.8874.88 ▲24.61
Media Library /wp-admin/upload.php1,643 ▲2554.22 ▼0.0298.87 ▼9.8345.04 ▼0.39
BWS Panel /wp-admin/rating.php?page=rtng-bws-panel260.440.0613.66
Settings /wp-admin/rating.php260.440.075.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rating-bws/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rating-bws/rating-bws.php:1775
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/rating-bws/includes/class-rtng-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rating-bws/bws_menu/class-bws-settings.php:1452

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/rating.php?page=rtng-bws-panel
    • > Network (severe)
    wp-admin/rating.php?page=rtng-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/rating.php
    • > Network (severe)
    wp-admin/rating.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Average rating displaying.), #2 (Average rating with a rate option for non-logged in users.), #3 (Average rating and a rate option.), #4 (Combined average rating with a rate option on hover.), #5 (Rate option in comments.), #6 (Plugin settings.), #7 (Plugin appearance settings.), #8 (Testimonials review form display.), #9 (Testimonials reviews display.)
The official readme.txt might help

rating-bws/rating-bws.php Passed 13 tests

The principal PHP file in "Rating by BestWebSoft" v. 1.6 is loaded by WordPress automatically on each request
84 characters long description:
Add rating plugin to your WordPress website to receive feedback from your customers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin20,999 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PO File114,0816,4728,267
PHP96406236,262
CSS101892775,648
JavaScript848111672
SVG400150

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.62
Average class complexity99.33
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity12.80
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
68 PNG files occupy 4.44MB with 1.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/icons/themes/rent-a-bike.png273.38KB112.59KB▼ 58.82%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_75_dadada_1x400.png0.16KB0.16KB0.00%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_222222_256x240.png6.86KB4.18KB▼ 39.05%
screenshot-2.png137.00KB48.61KB▼ 64.52%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_2e83ff_256x240.png4.49KB4.20KB▼ 6.46%