93% range-slider-for-contact-form-7

Code Review | Range Slider For Contact Form 7

WordPress plugin Range Slider For Contact Form 7 scored 93% from 54 tests.

About plugin

  • Plugin page: range-slider-for-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Nov 27, 2019
  • Latest release: Apr 4, 2022
  • Number of updates: 15
  • Update frequency: every 57.3 days
  • Top authors: vp956009 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active / 5,116 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼302.15ms] Passed 4 tests

Analyzing server-side resources used by Range Slider For Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0170.54 ▼9.60
Dashboard /wp-admin3.41 ▲0.0041.79 ▼0.71
Posts /wp-admin/edit.php3.64 ▲0.0043.90 ▼7.61
Add New Post /wp-admin/post-new.php6.88 ▼0.09122.56 ▼1,187.38
Media Library /wp-admin/upload.php3.29 ▲0.0042.62 ▼4.01

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Range Slider For Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲8615.63 ▼0.298.83 ▲0.993.94 ▲0.95
Dashboard /wp-admin2,926 ▲406.42 ▲0.00188.96 ▼20.10200.13 ▼2.98
Posts /wp-admin/edit.php2,691 ▲343.42 ▼0.00102.56 ▲17.69177.24 ▼7.16
Add New Post /wp-admin/post-new.php1,635 ▼517.15 ▼3.33652.23 ▲21.50195.11 ▼39.57
Media Library /wp-admin/upload.php1,698 ▲35.75 ▲0.01190.10 ▲2.26240.91 ▼9.04

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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/range-slider-for-contact-form-7/cf7-for-rangeslider.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

range-slider-for-contact-form-7/cf7-for-rangeslider.php 85% from 13 tests

This is the main PHP file of "Range Slider For Contact Form 7" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("range-slider-for-contact-form-7.php" instead of "cf7-for-rangeslider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin14,302 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52,4251,25712,287
CSS5144911,649
PHP24817366

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.50
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/star.png39.75KB10.35KB▼ 73.95%