84% wc-rich-reviews-lite

Code Review | WooCommerce Rich Reviews Lite

WordPress plugin WooCommerce Rich Reviews Lite scored 84% from 54 tests.

About plugin

  • Plugin page: wc-rich-reviews-lite
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 5.8.1
  • First release: Jun 6, 2016
  • Latest release: Jun 8, 2016
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: mukto90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 651 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼139.93ms] Passed 4 tests

A check of server-side resources used by WooCommerce Rich Reviews Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.2545.18 ▲18.26
Dashboard /wp-admin3.30 ▲0.2545.09 ▼12.35
Posts /wp-admin/edit.php3.35 ▲0.2459.49 ▲7.34
Add New Post /wp-admin/post-new.php5.58 ▲0.15105.99 ▼551.02
Media Library /wp-admin/upload.php3.16 ▲0.1544.04 ▼3.69
Rich Reviews /wp-admin/admin.php?page=wc-rich-reviews-settings3.1637.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 2 new options
New WordPress options
wc_rich_editor
wc_segmented_ratings

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Rich Reviews Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,052 ▲45618.50 ▲2.9612.57 ▼0.8354.79 ▲3.52
Dashboard /wp-admin3,229 ▲2988.15 ▲2.24189.13 ▲13.68112.21 ▼1.02
Posts /wp-admin/edit.php3,010 ▲2714.38 ▲1.6599.18 ▲24.2497.06 ▼3.38
Add New Post /wp-admin/post-new.php1,628 ▼5518.92 ▲0.08401.41 ▼34.73118.33 ▼0.32
Media Library /wp-admin/upload.php1,854 ▲474.84 ▼0.17142.31 ▼35.41118.98 ▼14.78
Rich Reviews /wp-admin/admin.php?page=wc-rich-reviews-settings1,5704.1695.4088.02

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
These items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • wc_rich_editor
    • wc_segmented_ratings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-rich-reviews-lite/admin/class.mdc-settings-api.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: woocommerce, multi rating, rating, rich review, woocommerce rating...

wc-rich-reviews-lite/wc-rich-reviews-lite.php Passed 13 tests

The main PHP script in "WooCommerce Rich Reviews Lite" version 1.0.0 is automatically included on every request by WordPress
80 characters long description:
Enables segmented ratings and rich text editor (WYSIWYG) in WooCommerce reviews.

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
No dangerous file extensions were detected722 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4196255691
JavaScript11116
CSS10015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity32.00
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected