89% cf7-woocommerce-memberships

Code Review | Contact Form 7 → WooCommerce Membership

WordPress plugin Contact Form 7 → WooCommerce Membership scored89%from 54 tests.

About plugin

  • Plugin page: cf7-woocommerce-m...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Jun 6, 2018
  • Latest release: Jun 6, 2018
  • Number of updates: 6
  • Update frequency: every 34.3 days
  • Top authors: macbookandrew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Contact Form 7 → WooCommerce Membership
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0638.11 ▼6.06
Dashboard /wp-admin3.36 ▲0.0543.04 ▼3.39
Posts /wp-admin/edit.php3.41 ▲0.0546.38 ▲0.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.32 ▼0.31
Media Library /wp-admin/upload.php3.28 ▲0.0535.91 ▼0.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 → WooCommerce Membership
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.48 ▲0.101.74 ▼1.0042.40 ▼11.22
Dashboard /wp-admin2,214 ▲265.07 ▼0.83107.64 ▼4.8641.34 ▼3.90
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0140.01 ▲3.6439.23 ▲6.33
Add New Post /wp-admin/post-new.php1,542 ▲923.09 ▼0.18610.86 ▼65.6764.43 ▲16.30
Media Library /wp-admin/upload.php1,396 ▲54.22 ▲0.0298.83 ▼6.6950.91 ▲4.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: spam, comments

cf7-woocommerce-memberships/cf7-woo-memberships.php 85% from 13 tests

The entry point to "Contact Form 7 → WooCommerce Membership" version 1.3.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-woocommerce-memberships.php" instead of "cf7-woo-memberships.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 detected303 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP263133281
JavaScript141022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
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

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