93% activetrail-contact-form-7

Code Review | ActiveTrail - Contact Form 7

WordPress plugin ActiveTrail - Contact Form 7 scored 93% from 54 tests.

About plugin

  • Plugin page: activetrail-conta...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 5.9.2
  • First release: Jun 14, 2017
  • Latest release: Aug 5, 2021
  • Number of updates: 10
  • Update frequency: every 153.6 days
  • Top authors: activetrailteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 3,312 total downloads


Plugin footprint Passed 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.09MB] [CPU: ▼301.03ms] Passed 4 tests

Analyzing server-side resources used by ActiveTrail - Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1859.06 ▲4.84
Dashboard /wp-admin3.52 ▲0.1237.81 ▼8.95
Posts /wp-admin/edit.php3.75 ▲0.1140.42 ▼1.40
Add New Post /wp-admin/post-new.php6.99 ▲0.0299.05 ▼1,191.22
Media Library /wp-admin/upload.php3.40 ▲0.1027.42 ▼2.54

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ActiveTrail - Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,782 ▲6015.75 ▼0.185.64 ▼0.482.16 ▼0.10
Dashboard /wp-admin2,911 ▲606.04 ▼0.18116.38 ▼22.85164.49 ▲2.13
Posts /wp-admin/edit.php2,705 ▲203.24 ▲0.0168.52 ▲3.38152.23 ▲5.85
Add New Post /wp-admin/post-new.php1,675 ▼2316.70 ▼0.73420.35 ▼1.26158.97 ▲0.16
Media Library /wp-admin/upload.php1,709 ▲115.57 ▲0.01140.61 ▼0.40191.24 ▼0.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: error_stack in wp-content/plugins/activetrail-contact-form-7/admin/partials/activetrail-cfs-admin-display.php on line 18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/activetrail-contact-form-7/admin/partials/activetrail-cfs-admin-display.php:31
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/activetrail-contact-form-7/admin/partials/activetrail-cfs-admin-display.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === activetrail-contact-form-7 === )
The official readme.txt is a good inspiration

activetrail-contact-form-7/activetrail-cfs.php 85% from 13 tests

The main PHP file in "ActiveTrail - Contact Form 7" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("activetrail-contact-form-7.php" instead of "activetrail-cfs.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
Success! There were no dangerous files found in this plugin792 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity18.50
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods26.90%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/activetrail-logo.png32.30KB8.69KB▼ 73.09%