83% contact-form-7-to-rest-call

Code Review | Contact Form 7 to REST Call

WordPress plugin Contact Form 7 to REST Call scored83%from 54 tests.

About plugin

  • Plugin page: contact-form-7-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 16, 2012
  • Latest release: Sep 16, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: twsbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Contact Form 7 to REST Call
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.41 ▲1.20
Dashboard /wp-admin3.32 ▲0.0251.88 ▼1.47
Posts /wp-admin/edit.php3.43 ▲0.0851.76 ▲5.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.12 ▼6.72
Media Library /wp-admin/upload.php3.24 ▲0.0238.88 ▲2.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 9 new options
New tables
wp_CF7RESTPlugin_SUBMITS
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
CF7RESTPlugin__installed
widget_recent-posts
theysaidso_admin_options
CF7RESTPlugin__metatdata
CF7RESTPlugin__displayName

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 to REST Call
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.15 ▼1.151.85 ▲0.2043.34 ▲1.11
Dashboard /wp-admin2,225 ▲344.86 ▼0.22107.25 ▲2.5643.63 ▼0.46
Posts /wp-admin/edit.php2,105 ▲191.98 ▼0.0337.18 ▲0.6933.54 ▼1.59
Add New Post /wp-admin/post-new.php1,541 ▲2723.20 ▲5.51659.63 ▲9.1756.01 ▼7.73
Media Library /wp-admin/upload.php1,404 ▲194.31 ▲0.1397.85 ▼10.9142.25 ▼3.47

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-7-to-rest-call/CF7RESTOptionsManager.php:134

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

contact-form-7-to-rest-call/contact-form-7-db.php 85% from 13 tests

Analyzing the main PHP file in "Contact Form 7 to REST Call" version 1.0
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 178 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-form-7-to-rest-call.php" instead of "contact-form-7-db.php")

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
There were no executable files found in this plugin444 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7120212444

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods2965.91%
▷ Protected methods1534.09%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin