83% integrate-contact-form-7-and-aweber

Code Review | Contact Form 7 AWeber Extension

WordPress plugin Contact Form 7 AWeber Extension scored83%from 54 tests.

About plugin

  • Plugin page: integrate-contact...
  • Plugin version: 0.1.38
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9.9
  • WordPress version: 6.3.1
  • First release: Jan 3, 2016
  • Latest release: Feb 3, 2022
  • Number of updates: 53
  • Update frequency: every 42.1 days
  • Top authors: rnzo (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /48,091 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.04MB] [CPU: ▲29.88ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 AWeber Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.50 ▲3.04108.22 ▲65.92
Dashboard /wp-admin6.40 ▲3.06521.68 ▲458.12
Posts /wp-admin/edit.php6.43 ▲3.0773.51 ▲22.81
Add New Post /wp-admin/post-new.php8.94 ▲3.06106.45 ▲6.12
Media Library /wp-admin/upload.php6.24 ▲3.0158.40 ▲24.68

Server storage [IO: ▲0.19MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 140 files (775.79KB) outside of "wp-content/plugins/integrate-contact-form-7-and-aweber/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/contact-form-7/admin/edit-contact-form.php
    • (new file) wp-content/plugins/contact-form-7/admin/admin.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/config-validator.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/tag-generator.php
    • (new file) wp-content/plugins/contact-form-7/admin/css/styles-rtl.css
    • (new file) wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php
    • (new file) wp-content/plugins/contact-form-7/admin/css/styles.css
    • (new file) wp-content/plugins/contact-form-7/admin/includes/admin-functions.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/editor.php
    • (new file) wp-content/plugins/contact-form-7/admin/includes/help-tabs.php
    • ...
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
wpcf7
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 AWeber Extension
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.23 ▼1.155.21 ▲3.4342.56 ▼1.20
Dashboard /wp-admin2,238 ▲534.88 ▼1.00105.90 ▼10.7239.63 ▼10.46
Posts /wp-admin/edit.php2,124 ▲352.04 ▲0.0243.44 ▲8.7537.56 ▲0.45
Add New Post /wp-admin/post-new.php6,380 ▲4,86627.63 ▲10.12873.71 ▲181.7436.97 ▼28.67
Media Library /wp-admin/upload.php1,417 ▲324.24 ▲0.0399.38 ▼6.0046.85 ▲3.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpcf7
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/aweber.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/wp.php:43
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/aweber.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberAPIBase' not found in wp-content/plugins/integrate-contact-form-7-and-aweber/api/aweber_api/aweber_response.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/actionsaw.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/activate.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/systemaw.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberResponse' not found in wp-content/plugins/integrate-contact-form-7-and-aweber/api/aweber_api/aweber_entry.php:3
    • > PHP Warning
      require_once(ABSPATH/wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/actionsaw.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/integrate-contact-form-7-and-aweber/lib/actionsaw.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (awe-screenshot-1.png), #2 (awe-screenshot-2.png)
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

integrate-contact-form-7-and-aweber/cf7-awb-ext.php 85% from 13 tests

"Contact Form 7 AWeber Extension" version 0.1.38's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("integrate-contact-form-7-and-aweber.php" instead of "cf7-awb-ext.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,803 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP267371,4422,275
JavaScript212851266
CSS15629262

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.46
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods135
▷ Static methods32.22%
▷ Public methods11685.93%
▷ Protected methods1813.33%
▷ Private methods10.74%
Functions48
▷ Named functions4593.75%
▷ Anonymous functions36.25%
Constants15
▷ Global constants15100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/postmark.png7.92KB3.66KB▼ 53.79%
assets/images/aweber-logo.png3.53KB3.22KB▼ 8.88%
assets/images/postmark-mailchimp.png7.92KB3.66KB▼ 53.79%
assets/images/postal-marks.png0.33KB0.35KB0.00%