90% cf7-preview

Code Review | Preview Form

WordPress plugin Preview Form scored90%from 54 tests.

About plugin

  • Plugin page: cf7-preview
  • Plugin version: 1.1.11
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2021
  • Latest release: Nov 16, 2023
  • Number of updates: 407
  • Update frequency: every 1.8 days
  • Top authors: adsvui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,536 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.03ms] Passed 4 tests

A check of server-side resources used by Preview Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.05 ▼0.97
Dashboard /wp-admin3.35 ▲0.0545.59 ▼4.40
Posts /wp-admin/edit.php3.40 ▲0.0550.47 ▲4.72
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.80 ▼10.86
Media Library /wp-admin/upload.php3.27 ▲0.0536.36 ▲4.10

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preview Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.29 ▼0.061.90 ▲0.1243.39 ▼2.61
Dashboard /wp-admin2,199 ▲285.58 ▲0.0489.33 ▼14.4042.83 ▼1.84
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0737.53 ▼0.3633.84 ▼2.90
Add New Post /wp-admin/post-new.php1,530 ▲423.13 ▼0.21665.92 ▼17.5354.02 ▼10.32
Media Library /wp-admin/upload.php1,404 ▲104.21 ▲0.0297.66 ▼9.8343.65 ▼3.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

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)
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: contact form 7, preview form

cf7-preview/index.php 92% from 13 tests

The main file in "Preview Form" v. 1.1.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("cf7-preview.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin283 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis 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.43
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions20100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin