83% rateitcool

Code Review | Product Reviews from rateit.cool for Woocommerce

WordPress plugin Product Reviews from rateit.cool for Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: rateitcool
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Oct 18, 2017
  • Number of updates: 20
  • Update frequency: every 38.0 days
  • Top authors: rateit.cool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,337 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.00MB] [CPU: ▼4.44ms] Passed 4 tests

This is a short check of server-side resources used by Product Reviews from rateit.cool for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.00 ▼5.77
Dashboard /wp-admin3.31 ▲0.0040.13 ▼11.99
Posts /wp-admin/edit.php3.36 ▲0.0046.01 ▼1.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.16 ▲1.25
Media Library /wp-admin/upload.php3.23 ▲0.0036.42 ▲3.29

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
wc_rateitcool_just_installed
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Product Reviews from rateit.cool for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.76 ▲0.181.76 ▼0.0839.26 ▼5.34
Dashboard /wp-admin2,200 ▲94.85 ▼1.0698.27 ▼14.2140.79 ▼5.17
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0540.41 ▼6.3335.65 ▼11.05
Add New Post /wp-admin/post-new.php1,544 ▲3018.91 ▲1.32602.01 ▼92.8950.79 ▼6.46
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.05104.42 ▲1.9444.51 ▼3.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wc_rateitcool_just_installed
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rateitcool/wc_rateitcool.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (rateit.cool settings page within Wordpress admin.), #2 (Productlist element with reviews counts and average review value.), #3 (Reviews counts and average review value at the product detail page.), #4 (Show Detail Reviews counts and average review value at the product detail page.), #5 (Product reviews on a example tab.), #6 (Product review form on a example tab.), #7 (Product review form at order history.), #8 (Shop review form at order history.)
You can look at the official readme.txt

rateitcool/wc_rateitcool.php 92% from 13 tests

Analyzing the main PHP file in "Product Reviews from rateit.cool for Woocommerce" version 1.0.3
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rateitcool.php" instead of "wc_rateitcool.php")

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
Success! There were no dangerous files found in this plugin2,479 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP594361,501
JavaScript25318844
CSS3140134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity16.00
▷ Minimum class complexity10.00
▷ Maximum class complexity22.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods313.04%
▷ Public methods834.78%
▷ Protected methods1356.52%
▷ Private methods28.70%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
10 PNG files occupy 0.82MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png499.97KB155.30KB▼ 68.94%
screenshot-7.png59.04KB19.64KB▼ 66.73%
screenshot-6.png53.21KB15.98KB▼ 69.97%
assets/images/logo_small.png0.48KB0.48KB0.00%
screenshot-8.png37.06KB11.95KB▼ 67.76%