88% contact-form-7-star-rating-with-font-awersome

Code Review | Contact Form 7 Star Rating with font Awesome

WordPress plugin Contact Form 7 Star Rating with font Awesome scored 88% from 54 tests.

About plugin

  • Plugin page: contact-form-7-st...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.1
  • WordPress version: 5.8.1
  • First release: May 6, 2014
  • Latest release: Aug 18, 2017
  • Number of updates: 11
  • Update frequency: every 109.1 days
  • Top authors: themelogger (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 7,373 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼142.98ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 Star Rating with font Awesome
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2033.62 ▲7.76
Dashboard /wp-admin3.16 ▲0.1045.50 ▲0.79
Posts /wp-admin/edit.php3.24 ▲0.1443.96 ▼3.74
Add New Post /wp-admin/post-new.php5.51 ▲0.0888.84 ▼571.31
Media Library /wp-admin/upload.php3.10 ▲0.1035.19 ▲2.34
Star Rating Awesome /wp-admin/options-general.php?page=starratingawesome-setting-admin3.0530.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Star Rating with font Awesome
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.12 ▲0.587.39 ▲0.2647.12 ▼7.29
Dashboard /wp-admin2,994 ▲606.05 ▲0.10153.29 ▲13.15115.84 ▼1.11
Posts /wp-admin/edit.php2,744 ▲52.82 ▲0.1366.77 ▼4.8593.40 ▼10.36
Add New Post /wp-admin/post-new.php1,673 ▲9219.14 ▼1.27392.38 ▼6.21122.59 ▲9.59
Media Library /wp-admin/upload.php1,812 ▲25.00 ▼0.01158.96 ▼3.82155.01 ▲29.58
Star Rating Awesome /wp-admin/options-general.php?page=starratingawesome-setting-admin1,0962.0864.6478.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=starratingawesome-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=starratingawesome-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-star-rating-with-font-awersome/starrating.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

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

The main PHP script in "Contact Form 7 Star Rating with font Awesome" version 1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-7-star-rating-with-font-awersome.php" instead of "starrating.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin510 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP112363457
CSS113944
JavaScript1259

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity23.50
▷ Minimum class complexity20.00
▷ Maximum class complexity27.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin