10% contact-form-7-to-post

Code Review | Contact Form 7 to Post

WordPress plugin Contact Form 7 to Post scored10%from 54 tests.

About plugin

  • Plugin page: contact-form-7-to...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: Jun 2, 2015
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: bastho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,759 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/contact-form-7-to-post/cf72post.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; CF7_2_Post has a deprecated constructor

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.34ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 to Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.58 ▲1.12
Dashboard /wp-admin3.31 ▼0.0349.63 ▼10.75
Posts /wp-admin/edit.php3.36 ▲0.0147.96 ▼0.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.53 ▼14.84
Media Library /wp-admin/upload.php3.24 ▲0.0134.54 ▲0.77

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 to Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.65 ▼0.701.70 ▼0.0843.39 ▲0.25
Dashboard /wp-admin2,203 ▲154.83 ▼1.0497.72 ▼16.4640.51 ▼1.83
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0540.06 ▲5.3036.11 ▲4.19
Add New Post /wp-admin/post-new.php1,514 ▼017.62 ▲0.06679.76 ▲0.4555.05 ▼7.32
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0592.53 ▼11.5739.96 ▼4.02

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/contact-form-7-to-post/cf72post.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: post, edit on front, contactform7, contact form 7, cf7...

contact-form-7-to-post/cf72post.php 85% from 13 tests

Analyzing the main PHP file in "Contact Form 7 to Post" version 1.0.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-form-7-to-post.php" instead of "cf72post.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected135 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP141199
PO File1121436

PHP code Passed 2 tests

This is a very shot review of 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.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin