84% woo-widget-for-ratingchamp-reviews

Code Review | WooCommerce Shop ratings & review widget by RatingChamp

WordPress plugin WooCommerce Shop ratings & review widget by RatingChamp scored 84% from 54 tests.

About plugin

  • Plugin page: woo-widget-for-ra...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.5
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: May 10, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: cloudstorm (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.78ms] Passed 4 tests

Server-side resources used by WooCommerce Shop ratings & review widget by RatingChamp
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.57 ▼3.85
Dashboard /wp-admin3.35 ▲0.0544.60 ▼2.66
Posts /wp-admin/edit.php3.40 ▲0.0449.56 ▲0.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.56 ▼5.37
Media Library /wp-admin/upload.php3.27 ▲0.0431.86 ▲0.81
RatingChamp /wp-admin/options-general.php?page=ratingchamp3.2128.94

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
recovery_mode_email_last_sent
widget_rc_widget
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Shop ratings & review widget by RatingChamp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.59 ▼0.781.95 ▼0.0140.52 ▼20.12
Dashboard /wp-admin2,210 ▲224.86 ▼1.04112.10 ▲6.4538.14 ▼3.98
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0441.02 ▲5.0835.25 ▲3.34
Add New Post /wp-admin/post-new.php1,541 ▲623.04 ▼0.01637.09 ▲9.3052.46 ▲0.94
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.1396.95 ▼5.0643.63 ▼0.04
RatingChamp /wp-admin/options-general.php?page=ratingchamp7081.536.7318.43

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_rc_widget
    • widget_recent-comments

Smoke tests 75% 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
    • > GET request to /wp-admin/options-general.php?page=ratingchamp
    • > Error in wp-content/plugins/woo-widget-for-ratingchamp-reviews/ratingchamp.php+78
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/woo-widget-for-ratingchamp-reviews/ratingchamp.php:78
    Stack trace:
    #0 wp-admin/includes/template.php(1824): ratingchamp_select_field_0_render()
    #1 wp-admin/includes/template.php(1778): do_settings_fields()
    #2 wp-content/plugins/woo-widget-for-ratingchamp-reviews/ratingchamp.php(129): do_settings_sections()
    #3 wp-includes/class-wp-hook.php(310): ratingchamp_options_page()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #8 {main}
    thrown

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

woo-widget-for-ratingchamp-reviews/ratingchamp.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce Shop ratings & review widget by RatingChamp" version 1.0.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-widget-for-ratingchamp-reviews.php" instead of "ratingchamp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin178 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27516178

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin