89% affiliates-contact-form-7

Code Review | Affiliates Contact Form 7 Integration

WordPress plugin Affiliates Contact Form 7 Integration scored 89% from 54 tests.

About plugin

  • Plugin page: affiliates-contac...
  • Plugin version: 5.3.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Oct 2, 2013
  • Latest release: May 18, 2022
  • Number of updates: 31
  • Update frequency: every 101.7 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 24,581 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.48ms] Passed 4 tests

A check of server-side resources used by Affiliates Contact Form 7 Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.20 ▲1.68
Dashboard /wp-admin3.40 ▲0.0952.67 ▲1.10
Posts /wp-admin/edit.php3.45 ▲0.0951.18 ▼4.50
Add New Post /wp-admin/post-new.php5.98 ▲0.09102.58 ▲11.32
Media Library /wp-admin/upload.php3.32 ▲0.0938.82 ▲3.62

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Affiliates Contact Form 7 Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲2914.47 ▼0.201.75 ▲0.0343.84 ▲0.07
Dashboard /wp-admin2,235 ▲295.89 ▲0.06104.10 ▼2.8641.73 ▲4.76
Posts /wp-admin/edit.php2,117 ▲282.00 ▼0.0537.52 ▼2.2635.73 ▲1.35
Add New Post /wp-admin/post-new.php1,543 ▲117.67 ▼5.71712.76 ▲39.3554.00 ▼1.89
Media Library /wp-admin/upload.php1,420 ▲294.26 ▲0.0898.38 ▲2.6142.34 ▲0.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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 require attention:
  • Tags: There are too many tags (28 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Settings), #2 (More settings), #3 (Referral recorded for a contact form submission), #4 (Referral recorded for a form with fixed amount), #5 (Referral recorded for a form that provides a base amount used to calculate the referral amount), #6 (Example form with a hidden fixed amount), #7 (Example form with a base-amount field)
The official readme.txt is a good inspiration

affiliates-contact-form-7/affiliates-contact-form-7.php Passed 13 tests

"Affiliates Contact Form 7 Integration" version 5.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Integrates Affiliates, Affiliates Pro and Affiliates Enterprise with Contact Form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin945 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5155270945

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity61.75
▷ Minimum class complexity20.00
▷ Maximum class complexity100.00
Average method complexity15.29
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods17100.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants38.82%
▷ Class constants3191.18%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.38MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png78.80KB26.65KB▼ 66.18%
screenshot-5.png32.63KB9.33KB▼ 71.40%
screenshot-3.png37.18KB10.96KB▼ 70.52%
screenshot-7.png44.28KB12.24KB▼ 72.35%
screenshot-4.png48.99KB13.24KB▼ 72.97%