10% custom-reviews-and-ratings-for-woocommerce

Code Review | Custom Reviews Woocommerce

WordPress plugin Custom Reviews Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: custom-reviews-an...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 24, 2018
  • Latest release: Apr 24, 2018
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: modalweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/custom-reviews-and-ratings-for-woocommerce/custom-ratings-reviews-woocommerce.php+31
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.96ms] Passed 4 tests

A check of server-side resources used by Custom Reviews Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0341.88 ▼0.99
Dashboard /wp-admin3.38 ▲0.0349.98 ▼10.34
Posts /wp-admin/edit.php3.49 ▲0.0950.47 ▲0.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0390.45 ▼16.66
Media Library /wp-admin/upload.php3.30 ▲0.0337.33 ▲0.14

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

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

Browser metrics Passed 4 tests

Custom Reviews Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▲0.121.61 ▼0.2740.03 ▲1.12
Dashboard /wp-admin2,195 ▲155.69 ▲0.0682.89 ▼15.5238.52 ▼3.43
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0533.90 ▼2.0130.79 ▼3.28
Add New Post /wp-admin/post-new.php1,534 ▲13018.38 ▲0.07620.38 ▼1.8780.92 ▲30.72
Media Library /wp-admin/upload.php1,400 ▲64.17 ▲0.0298.88 ▲1.3840.77 ▼1.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • mw_custom_ratings_reviews_woocommerce_options
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-reviews-and-ratings-for-woocommerce/custom-ratings-reviews-woocommerce.php:18

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: custom reviews, ratings, custom rating, woocommerce, reviews

custom-reviews-and-ratings-for-woocommerce/custom-ratings-reviews-woocommerce.php 92% from 13 tests

The primary PHP file in "Custom Reviews Woocommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-reviews-and-ratings-for-woocommerce.php" instead of "custom-ratings-reviews-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3039222

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin