72% totalrating

Code Review | Rating Widget: Post Rating, 5 Star Rating, Reviews, Thumbs Up & Down, Reaction

WordPress plugin Rating Widget: Post Rating, 5 Star Rating, Reviews, Thumbs Up & Down, Reaction scored72%from 54 tests.

About plugin

  • Plugin page: totalrating
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: May 9, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 101
  • Update frequency: every 12.4 days
  • Top authors: totalsuite (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,592 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲2.83MB] [CPU: ▲26.86ms] Passed 4 tests

This is a short check of server-side resources used by Rating Widget: Post Rating, 5 Star Rating, Reviews, Thumbs Up & Down, Reaction
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.26 ▲2.8065.91 ▲26.14
Dashboard /wp-admin6.11 ▲2.8084.12 ▲31.93
Posts /wp-admin/edit.php6.26 ▲2.9179.05 ▲24.88
Add New Post /wp-admin/post-new.php8.81 ▲2.93121.42 ▲24.50
Media Library /wp-admin/upload.php6.02 ▲2.8086.17 ▲48.66
TotalRating /wp-admin/admin.php?page=totalrating6.1769.26

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 752 new files
Database: 2 new tables, 10 new options
New tables
wp_totalrating_widgets
wp_totalrating_ratings
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
totalrating_options
totalrating_tracking
totalsuite_license
theysaidso_admin_options
totalrating_version
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rating Widget: Post Rating, 5 Star Rating, Reviews, Thumbs Up & Down, Reaction
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10713.26 ▼1.491.88 ▼0.0443.54 ▼1.53
Dashboard /wp-admin2,274 ▲674.87 ▼0.03105.05 ▼21.3937.19 ▼18.50
Posts /wp-admin/edit.php2,153 ▲502.00 ▼0.0237.75 ▼0.9837.74 ▲2.07
Add New Post /wp-admin/post-new.php1,581 ▲5522.70 ▲5.20639.74 ▼16.5257.05 ▼11.09
Media Library /wp-admin/upload.php1,453 ▲534.21 ▲0.01108.39 ▼9.6344.56 ▼5.48
Dashboard /wp-admin/admin.php?page=totalrating#/dashboard1,99510.51146.13107.00
Options /wp-admin/admin.php?page=totalrating#/options1,41110.73156.8648.51
Templates /wp-admin/admin.php?page=totalrating#/modules/template1,42610.31125.0450.03
Support /wp-admin/admin.php?page=totalrating#/support2,01210.59152.68131.75
Popup /wp-admin/admin.php?page=totalrating#/popup1,37410.27119.0853.71
TotalRating /wp-admin/admin.php?page=totalrating1,99210.46120.96121.22
License /wp-admin/admin.php?page=totalrating#/license2,02110.80139.8675.48
Widgets /wp-admin/admin.php?page=totalrating#/widgets1,84810.39135.5362.41
Extensions /wp-admin/admin.php?page=totalrating#/modules/extension1,40210.31135.8749.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_totalrating_ratings
    • wp_totalrating_widgets
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • totalsuite_license
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/totalrating/views/dashboard.php

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 76% 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 require attention:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #21, #22, #23, #24, #25, #26, #27, #28, #29, #3, #30, #31, #32, #33, #4, #5, #5, #6, #7, #8, #9 in totalrating/assets to your readme.txt
  • Tags: There are too many tags (47 tag instead of maximum 10)
The official readme.txt might help

totalrating/plugin.php 62% from 13 tests

"Rating Widget: Post Rating, 5 Star Rating, Reviews, Thumbs Up & Down, Reaction" version 1.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8.0" instead of "4.8")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("totalrating.php" instead of "plugin.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

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
There were no executable files found in this plugin39,059 lines of code in 587 files:
LanguageFilesBlank linesComment linesLines of code
PHP5487,18317,01926,358
JavaScript101,1483,13610,560
JSON300840
SVG1800716
CSS55174407
PO File15067130
SQL20048

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces111
Interfaces60
Traits35
Classes436
▷ Abstract classes378.49%
▷ Concrete classes39991.51%
▷ Final classes51.25%
Methods2,418
▷ Static methods1686.95%
▷ Public methods2,11987.63%
▷ Protected methods28211.66%
▷ Private methods170.70%
Functions100
▷ Named functions55.00%
▷ Anonymous functions9595.00%
Constants165
▷ Global constants00.00%
▷ Class constants165100.00%
▷ Public constants16499.39%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.07MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/totalsuite-products.png54.63KB39.21KB▼ 28.23%
modules/templates/DefaultTemplate/assets/module/icon.png9.91KB10.55KB0.00%
modules/templates/DefaultTemplate/assets/module/cover.png6.04KB6.23KB0.00%