77% agile-crm-contact-form-7-forms

Code Review | Agile CRM Contact Form 7 Forms

WordPress plugin Agile CRM Contact Form 7 Forms scored77%from 54 tests.

About plugin

  • Plugin page: agile-crm-contact...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2018
  • Latest release: Sep 10, 2020
  • Number of updates: 10
  • Update frequency: every 94.5 days
  • Top authors: shreyanshsurana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,118 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.11ms] Passed 4 tests

An overview of server-side resources used by Agile CRM Contact Form 7 Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.86 ▼0.53
Dashboard /wp-admin3.32 ▲0.0249.23 ▲0.97
Posts /wp-admin/edit.php3.38 ▲0.0244.88 ▼12.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.54 ▼0.47
Media Library /wp-admin/upload.php3.25 ▲0.0235.43 ▲0.73
Agile Contact Form 7 Forms /wp-admin/options-general.php?page=agile-cf7-addon3.2531.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Agile CRM Contact Form 7 Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.25 ▼0.021.71 ▲0.0844.82 ▲3.90
Dashboard /wp-admin2,202 ▲255.67 ▲0.1485.13 ▼11.7638.15 ▲0.39
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0238.24 ▲2.1231.97 ▼6.90
Add New Post /wp-admin/post-new.php1,529 ▲122.90 ▲1.64673.45 ▲79.2955.11 ▼3.93
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.04111.28 ▲13.2950.99 ▲7.65
Agile Contact Form 7 Forms /wp-admin/options-general.php?page=agile-cf7-addon9022.0127.2632.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/agile-crm-contact-form-7-forms/agile-contact-form-7.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/agile-crm-contact-form-7-forms/templates/form-tab.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/agile-crm-contact-form-7-forms/templates/account-tab.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 ('/assets/screenshot-1.png'), #2 ('/assets/screenshot-2.png'), #3 ('/assets/screenshot-3.png'), #4 ('/assets/screenshot-4.png')
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

agile-crm-contact-form-7-forms/agile-contact-form-7.php 85% from 13 tests

The main PHP file in "Agile CRM Contact Form 7 Forms" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "4.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("agile-crm-contact-form-7-forms.php" instead of "agile-contact-form-7.php")

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
Everything looks great! No dangerous files found in this plugin654 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP311069509
JavaScript1241145

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/agile500.png5.92KB3.87KB▼ 34.73%