83% comment-rating-stars

Code Review | Comment Rating Stars

WordPress plugin Comment Rating Stars scored83%from 54 tests.

About plugin

  • Plugin page: comment-rating-stars
  • Plugin version: 1.0.0-RC1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Oct 1, 2013
  • Latest release: Oct 1, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jgadbois (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /3,924 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Comment Rating Stars
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.21 ▼2.94
Dashboard /wp-admin3.35 ▲0.0451.57 ▼7.41
Posts /wp-admin/edit.php3.46 ▲0.1049.08 ▼2.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.72 ▼24.53
Media Library /wp-admin/upload.php3.27 ▲0.0437.97 ▼0.18

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Comment Rating Stars
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.66 ▼0.656.13 ▲4.5044.71 ▲1.98
Dashboard /wp-admin2,230 ▲274.94 ▼0.09103.24 ▼5.7042.87 ▼1.54
Posts /wp-admin/edit.php2,106 ▲62.06 ▲0.0537.43 ▼5.4435.38 ▼2.87
Add New Post /wp-admin/post-new.php1,532 ▲12417.65 ▼0.15664.41 ▲36.4059.16 ▲12.66
Media Library /wp-admin/upload.php1,400 ▲64.24 ▲0.0098.07 ▼10.8241.96 ▼9.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-rating-stars/comment-star-reviews.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (An example review form), #2 (An example review), #3 (An example total ratings section)
You can look at the official readme.txt

comment-rating-stars/comment-star-reviews.php 85% from 13 tests

"Comment Rating Stars" version 1.0.0-RC1...'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:
  • Main file name: Name the main plugin file the same as the plugin slug ("comment-rating-stars.php" instead of "comment-star-reviews.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.0.0-RC1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin307 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26430193
CSS114282
Bourne Shell113929
JavaScript2013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods21100.00%
▷ Public methods1676.19%
▷ Protected methods00.00%
▷ Private methods523.81%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png7.56KB2.33KB▼ 69.23%
assets/screenshot-2.png18.78KB5.33KB▼ 71.61%
assets/screenshot-1.png25.22KB6.55KB▼ 74.03%