83% activetrail-contact-form-7

Code Review | ActiveTrail - Contact Form 7

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

About plugin

  • Plugin page: activetrail-conta...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2017
  • Latest release: Oct 5, 2023
  • Number of updates: 12
  • Update frequency: every 193.9 days
  • Top authors: activetrailteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /5,094 total downloads

Benchmarks

Plugin footprint 82% 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.11MB] [CPU: ▼5.58ms] Passed 4 tests

An overview of server-side resources used by ActiveTrail - Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.71 ▼6.64
Dashboard /wp-admin3.41 ▲0.1153.26 ▼3.25
Posts /wp-admin/edit.php3.52 ▲0.1756.22 ▲3.71
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.52 ▼12.16
Media Library /wp-admin/upload.php3.33 ▲0.1039.96 ▼0.26

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/activetrail-contact-form-7/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

ActiveTrail - Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6713.59 ▼1.091.71 ▼0.2739.80 ▼5.17
Dashboard /wp-admin2,234 ▲315.81 ▲0.9597.10 ▼10.5745.45 ▲2.27
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0142.94 ▲1.0638.59 ▲0.79
Add New Post /wp-admin/post-new.php1,548 ▲2218.24 ▲0.70625.74 ▼57.8650.29 ▼2.77
Media Library /wp-admin/upload.php1,416 ▲164.20 ▼0.03100.11 ▼12.6545.28 ▼5.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > 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

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === activetrail-contact-form-7 === )
You can look at the official readme.txt

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

The main PHP script in "ActiveTrail - Contact Form 7" version 1.1.3 is automatically included on every request by WordPress
The following require your attention:
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected793 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11226405686
CSS117474
JavaScript111233

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ 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/postal-marks.png0.33KB0.35KB0.00%
admin/images/activetrail-logo.png32.30KB8.69KB▼ 73.09%