83% newsletter-for-contact-form-7

Code Review | Newsletter for Contact Form 7

WordPress plugin Newsletter for Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: newsletter-for-co...
  • Plugin version: 1.27.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Apr 27, 2018
  • Number of updates: 6
  • Update frequency: every 1.5 days
  • Top authors: azexo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.80ms] Passed 4 tests

A check of server-side resources used by Newsletter for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.79 ▼5.18
Dashboard /wp-admin3.37 ▲0.0661.13 ▲11.34
Posts /wp-admin/edit.php3.42 ▲0.0647.27 ▼1.76
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.12 ▼15.42
Media Library /wp-admin/upload.php3.29 ▲0.0634.80 ▼0.83
Forms Submissions /wp-admin/edit.php?post_type=azf_submission3.3336.22
Add Submission /wp-admin/post-new.php?post_type=azf_submission3.3542.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲11213.33 ▼1.314.34 ▲2.5938.59 ▼8.01
Dashboard /wp-admin2,250 ▲655.90 ▲0.05111.29 ▲1.8046.45 ▲3.97
Posts /wp-admin/edit.php2,132 ▲402.07 ▲0.0536.06 ▼5.7237.89 ▲2.20
Add New Post /wp-admin/post-new.php1,547 ▲1417.43 ▼6.13627.49 ▼62.6753.25 ▲2.61
Media Library /wp-admin/upload.php1,432 ▲414.24 ▲0.1095.09 ▼9.9742.87 ▼4.79
Forms Submissions /wp-admin/edit.php?post_type=azf_submission1,1381.9631.7628.02
Add Submission /wp-admin/post-new.php?post_type=azf_submission1,9452.8153.0565.59

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/newsletter-for-contact-form-7/azh_cf7_newsletter.php:12

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

newsletter-for-contact-form-7/azh_cf7_newsletter.php 85% from 13 tests

"Newsletter for Contact Form 7" version 1.27.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("newsletter-for-contact-form-7.php" instead of "azh_cf7_newsletter.php")

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
Success! There were no dangerous files found in this plugin253 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228238
JavaScript12015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin