78% contact-form-7-star-rating

Code Review | Contact Form 7 Star Rating

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

About plugin

  • Plugin page: contact-form-7-st...
  • Plugin version: 1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.1
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Aug 26, 2017
  • Number of updates: 13
  • Update frequency: every 95.2 days
  • Top authors: themelogger (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /10,808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.98ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 Star Rating
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.52 ▼0.47
Dashboard /wp-admin3.40 ▲0.0950.88 ▼1.90
Posts /wp-admin/edit.php3.51 ▲0.1544.94 ▼3.84
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.52 ▼5.72
Media Library /wp-admin/upload.php3.32 ▲0.0943.20 ▲4.23
Star rating settings /wp-admin/options-general.php?page=starrating-setting-admin3.2633.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Star Rating
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.061.74 ▼0.2845.08 ▲2.19
Dashboard /wp-admin2,199 ▲195.54 ▼0.0986.55 ▼0.2337.71 ▼7.00
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0535.34 ▼1.7335.62 ▼2.26
Add New Post /wp-admin/post-new.php1,529 ▼723.32 ▲4.95662.64 ▲15.5558.24 ▼6.81
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.08108.30 ▲5.8246.32 ▲0.28
Star rating settings /wp-admin/options-general.php?page=starrating-setting-admin8272.0024.7425.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=starrating-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=starrating-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-star-rating/starrating.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

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

"Contact Form 7 Star Rating" version 1.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-form-7-star-rating.php" instead of "starrating.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
There were no executable files found in this plugin669 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP111350423
JavaScript268119229
CSS21417

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery.rating/star.png2.61KB1.51KB▼ 42.03%
jquery.rating/delete.png1.75KB0.81KB▼ 53.70%