84% acymailing-integration-for-contact-form-7

Code Review | Contact Form 7 integration - AcyMailing

WordPress plugin Contact Form 7 integration - AcyMailing scored84%from 54 tests.

About plugin

  • Plugin page: acymailing-integr...
  • Plugin version: 2.4
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2020
  • Latest release: Oct 24, 2023
  • Number of updates: 19
  • Update frequency: every 58.6 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Contact Form 7 integration - AcyMailing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.91 ▼2.64
Dashboard /wp-admin3.32 ▼0.0341.75 ▼14.84
Posts /wp-admin/edit.php3.37 ▲0.0144.38 ▼1.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.85 ▼18.75
Media Library /wp-admin/upload.php3.24 ▲0.0135.32 ▲1.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 integration - AcyMailing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.53 ▲0.161.88 ▲0.1740.44 ▲0.88
Dashboard /wp-admin2,198 ▲245.59 ▲0.0191.69 ▲4.7937.97 ▼3.36
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0040.53 ▲7.9234.77 ▼2.03
Add New Post /wp-admin/post-new.php1,529 ▲323.63 ▼0.11675.12 ▼13.7357.46 ▼1.57
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.0196.91 ▲3.8641.19 ▼2.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_html_class() in wp-content/plugins/acymailing-integration-for-contact-form-7/views/acymsubDisplay.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymPlugin' not found in wp-content/plugins/acymailing-integration-for-contact-form-7/plugin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_translation() in wp-content/plugins/acymailing-integration-for-contact-form-7/views/acymsubParameters.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/acymailing-integration-for-contact-form-7/acymailing-contactform7.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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: subscription, newsletter form, form, newsletter, acymailing

acymailing-integration-for-contact-form-7/acymailing-contactform7.php 92% from 13 tests

The primary PHP file in "Contact Form 7 integration - AcyMailing" version 2.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acymailing-integration-for-contact-form-7.php" instead of "acymailing-contactform7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin354 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55114291
JavaScript111160
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods111.11%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner.png17.32KB5.66KB▼ 67.29%