84% contact-form-newsletter

Code Review | Fast Secure Contact Form Newsletter

WordPress plugin Fast Secure Contact Form Newsletter scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-news...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Dec 3, 2012
  • Latest release: Aug 27, 2014
  • Number of updates: 35
  • Update frequency: every 18.1 days
  • Top authors: katzwebdesign (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /36,246 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▲2.26ms] Passed 4 tests

An overview of server-side resources used by Fast Secure Contact Form Newsletter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8455.00 ▲13.81
Dashboard /wp-admin4.15 ▲0.8447.63 ▲1.33
Posts /wp-admin/edit.php4.20 ▲0.8451.66 ▲7.17
Add New Post /wp-admin/post-new.php6.67 ▲0.7797.33 ▼1.04
Media Library /wp-admin/upload.php4.01 ▲0.7735.97 ▲1.58

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Fast Secure Contact Form Newsletter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.17 ▼0.181.97 ▲0.3539.41 ▼3.98
Dashboard /wp-admin2,195 ▲155.56 ▼0.1181.24 ▼4.6338.80 ▲2.40
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0639.67 ▼0.0636.08 ▼0.46
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▼0.65676.46 ▲17.0561.78 ▲11.25
Media Library /wp-admin/upload.php1,403 ▼04.12 ▼0.0596.68 ▼0.1541.35 ▼0.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/examples/contactReporting.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/config.php:15
    • > PHP Notice
      Undefined index: apiKey in wp-content/plugins/contact-form-newsletter/ctct_php_library/examples/example_verification.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/config.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/contact-form-newsletter/contact-form-newsletter.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/examples/addContact.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTOAuth' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/examples/example_verification.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/config.php:15
    • > PHP Notice
      Undefined index: return in wp-content/plugins/contact-form-newsletter/ctct_php_library/examples/example_verification.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'CTCTDataStore' not found in wp-content/plugins/contact-form-newsletter/ctct_php_library/config.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The configuration screen of the Fast Secure Contact Form when you have this newsletter plugin installed and activated.), #2 (Specify how fields are mapped to Constant Contact fields), #3 (Choose the lists form submissions are sent to)
You can take inspiration from this readme.txt

contact-form-newsletter/contact-form-newsletter.php Passed 13 tests

The main PHP script in "Fast Secure Contact Form Newsletter" version 2.1.2 is automatically included on every request by WordPress
56 characters long description:
Integrate Constant Contact with Fast Secure Contact Form

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,516 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP136031,2103,516

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.06
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes48.16%
▷ Concrete classes4591.84%
▷ Final classes00.00%
Methods247
▷ Static methods3514.17%
▷ Public methods23093.12%
▷ Protected methods31.21%
▷ Private methods145.67%
Functions4
▷ Named functions4100.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
3 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
favicon.png0.73KB0.87KB0.00%
screenshot-2.png58.59KB23.23KB▼ 60.35%
screenshot-1.png74.16KB23.95KB▼ 67.71%