83% activetrail-contact-form-7-integration

Code Review | Contact Form 7 - ActiveTrail integration

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

About plugin

  • Plugin page: activetrail-conta...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 13, 2016
  • Latest release: May 5, 2017
  • Number of updates: 14
  • Update frequency: every 21.1 days
  • Top authors: roycegracie (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /1,369 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.15ms] Passed 4 tests

Server-side resources used by Contact Form 7 - ActiveTrail integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.02 ▲2.24
Dashboard /wp-admin3.36 ▲0.0545.37 ▼1.81
Posts /wp-admin/edit.php3.41 ▲0.0548.82 ▲2.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.99 ▲3.80
Media Library /wp-admin/upload.php3.28 ▲0.0537.72 ▲2.01

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 - ActiveTrail integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.22 ▼1.161.78 ▼0.4044.05 ▼4.88
Dashboard /wp-admin2,215 ▲245.87 ▲0.99109.07 ▲2.7444.03 ▼3.97
Posts /wp-admin/edit.php2,097 ▲81.99 ▲0.0241.32 ▼0.3736.11 ▲0.80
Add New Post /wp-admin/post-new.php1,552 ▲3318.46 ▼4.76668.78 ▼8.9253.54 ▼12.23
Media Library /wp-admin/upload.php1,397 ▲64.24 ▼0.01104.25 ▲6.5147.34 ▲2.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/activetrail-contact-form-7-integration/activetrail-addon.php:41

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: A description for screenshot #0 is required in activetrail-contact-form-7-integration/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === activetrail-contact-form-7-integration === )
  • Screenshots: Add an image for screenshot #1 (this is an example of how it will look like)
The official readme.txt might help

activetrail-contact-form-7-integration/activetrail-addon.php 92% from 13 tests

The entry point to "Contact Form 7 - ActiveTrail integration" version 0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("activetrail-contact-form-7-integration.php" instead of "activetrail-addon.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
No dangerous file extensions were detected560 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP217983560

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected