78% star-rating-field-for-contact-form-7

Code Review | Star Rating Field For Contact Form 7

WordPress plugin Star Rating Field For Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: star-rating-field...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Jul 3, 2023
  • Number of updates: 8
  • Update frequency: every 44.9 days
  • Top authors: howdytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /989 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.05MB] [CPU: ▼2.22ms] Passed 4 tests

A check of server-side resources used by Star Rating Field For Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.28 ▼0.83
Dashboard /wp-admin3.36 ▲0.0545.07 ▼6.37
Posts /wp-admin/edit.php3.41 ▲0.0546.88 ▼2.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.22 ▲4.51
Media Library /wp-admin/upload.php3.28 ▲0.0534.05 ▲0.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Star Rating Field For Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.60 ▼0.835.88 ▲3.9837.78 ▼6.57
Dashboard /wp-admin2,203 ▲214.84 ▼1.01112.09 ▲7.6040.62 ▼1.12
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0639.14 ▼4.4334.22 ▼0.29
Add New Post /wp-admin/post-new.php1,533 ▼922.94 ▲4.58597.33 ▼34.8847.28 ▼8.91
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0195.92 ▼5.5342.92 ▲1.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/star-rating-field-for-contact-form-7/star-rating-field-for-contact-form-7.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/star-rating-field-for-contact-form-7/inc/form-tag.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/star-rating-field-for-contact-form-7/inc/tag.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/star-rating-field-for-contact-form-7/inc/filter.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

star-rating-field-for-contact-form-7/star-rating-field-for-contact-form-7.php 92% from 13 tests

The main file in "Star Rating Field For Contact Form 7" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected825 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript218046584
PHP54211187
CSS17039
SVG10015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
11 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/jquery.rating/images/medal-on.png0.62KB0.77KB0.00%
asset/jquery.rating/images/star-half.png0.94KB1.06KB0.00%
asset/jquery.rating/images/face-on.png0.71KB0.83KB0.00%
asset/jquery.rating/images/star-2.png0.79KB0.74KB▼ 6.88%
asset/jquery.rating/images/star-off.png0.91KB0.81KB▼ 10.97%