84% post-my-contact-form-7

Code Review | Post My CF7 Form

WordPress plugin Post My CF7 Form scored84%from 54 tests.

About plugin

  • Plugin page: post-my-contact-f...
  • Plugin version: 6.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.0
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Nov 8, 2023
  • Number of updates: 143
  • Update frequency: every 18.8 days
  • Top authors: aurovrata (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

3,000+ active /75,483 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼3.80ms] Passed 4 tests

Server-side resources used by Post My CF7 Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.15 ▲3.24
Dashboard /wp-admin3.31 ▼0.0444.76 ▼16.16
Posts /wp-admin/edit.php3.36 ▲0.0047.23 ▼2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.80 ▲1.60
Media Library /wp-admin/upload.php3.23 ▲0.0034.26 ▲1.95

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 150 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Post My CF7 Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▲0.391.76 ▲0.2044.62 ▲5.36
Dashboard /wp-admin2,198 ▲175.56 ▼0.1587.59 ▼22.1836.75 ▼3.03
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0139.31 ▼2.0734.98 ▼4.92
Add New Post /wp-admin/post-new.php1,536 ▲1025.19 ▲2.16602.41 ▼74.1674.49 ▲21.69
Media Library /wp-admin/upload.php1,403 ▲124.23 ▲0.09102.89 ▲3.9144.24 ▼2.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-my-contact-form-7/includes/class-cf72post-mapping-factory.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-my-contact-form-7/includes/mapper/class-c2p-custom-post-mapper.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-my-contact-form-7/includes/mapper/class-c2p-system-post-mapper.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/post-my-contact-form-7/includes/partials/cf7-2-post-script.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: contact form 7 module, form to post, contact form 7 extension, custom post, contact form 7 to post...

post-my-contact-form-7/cf7-2-post.php 92% from 13 tests

Analyzing the main PHP file in "Post My CF7 Form" version 6.0.5
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-my-contact-form-7.php" instead of "cf7-2-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected20,112 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript702,7791,19311,216
PHP292532,4974,376
CSS2196102,067
SVG2221,547
PO File2212240557
LESS6290181
Markdown1510126
JSON20042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity45.67
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods156
▷ Static methods148.97%
▷ Public methods13183.97%
▷ Protected methods1710.90%
▷ Private methods85.13%
Functions18
▷ Named functions1055.56%
▷ Anonymous functions844.44%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
5 PNG files occupy 0.30MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons/banner-772x250.png87.97KB29.72KB▼ 66.22%
assets/icons/icon-128x128.png56.81KB10.78KB▼ 81.03%
admin/css/image/php-sprite.png3.78KB3.05KB▼ 19.29%
assets/select2/css/select2.png0.60KB0.99KB0.00%
assets/icons/icon-256x256.png161.04KB38.29KB▼ 76.22%