72% cf7-constant-contact-fields-mapping

Code Review | CF7 Constant Contact Fields Mapping

WordPress plugin CF7 Constant Contact Fields Mapping scored 72% from 54 tests.

About plugin

  • Plugin page: cf7-constant-cont...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.38+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 5.9.2
  • First release: Apr 1, 2020
  • Latest release: Apr 1, 2020
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: ahmed17 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 329 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by CF7 Constant Contact Fields Mapping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0160.18 ▲1.79
Dashboard /wp-admin3.41 ▲0.0141.49 ▲1.85
Posts /wp-admin/edit.php3.64 ▲0.0138.94 ▼5.87
Add New Post /wp-admin/post-new.php6.88 ▼0.08104.21 ▼1,220.23
Media Library /wp-admin/upload.php3.30 ▲0.0027.94 ▼1.87
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius3.1018.87

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 178 new files
Database: no new tables, 4 new options
New WordPress options
fs_accounts
fs_gdpr
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

CF7 Constant Contact Fields Mapping: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲5915.67 ▲0.066.42 ▲0.892.40 ▼0.30
Dashboard /wp-admin2,874 ▲135.99 ▼0.29123.87 ▼12.96160.61 ▼4.87
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0162.62 ▼3.01140.53 ▼4.37
Add New Post /wp-admin/post-new.php1,661 ▼5816.09 ▼5.94427.96 ▼2.62153.58 ▼4.29
Media Library /wp-admin/upload.php1,698 ▼05.49 ▼0.03137.14 ▼6.19180.70 ▼10.45
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius280.940.0317.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/ajax-loader.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/cf7-constant-contact-fields-mapping/freemius/templates/partials/network-activation.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    wp-admin/admin.php?page=freemius - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: constant contact fields mapping, contact form 7, contact form 7 constant contact integration, cf7, constant contact custom fields mapping

cf7-constant-contact-fields-mapping/cf7-constant-contact-fields-mapping.php 85% from 13 tests

The entry point to "CF7 Constant Contact Fields Mapping" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)
  • 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected45,684 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1087,13115,89730,234
PO File126,9608,45515,240
JavaScript43460195
CSS120015

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity87.43
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,139
▷ Static methods17315.19%
▷ Public methods79870.06%
▷ Protected methods161.40%
▷ Private methods32528.53%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants130
▷ Global constants10580.77%
▷ Class constants2519.23%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/map.png2.06KB1.59KB▼ 23.10%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%