83% teamgate-crm-forms

Code Review | Teamgate CRM Forms for WordPress

WordPress plugin Teamgate CRM Forms for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: teamgate-crm-forms
  • Plugin version: 1.6.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 6, 2016
  • Latest release: Sep 6, 2023
  • Number of updates: 39
  • Update frequency: every 64.7 days
  • Top authors: teamgate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.62ms] Passed 4 tests

Server-side resources used by Teamgate CRM Forms for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.90 ▲0.45
Dashboard /wp-admin3.31 ▲0.0046.89 ▼6.24
Posts /wp-admin/edit.php3.36 ▲0.0046.86 ▼7.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.83 ▼9.48
Media Library /wp-admin/upload.php3.23 ▲0.0040.18 ▲1.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Teamgate CRM Forms for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.401.62 ▲0.0243.83 ▲1.63
Dashboard /wp-admin2,206 ▲154.85 ▼0.04105.89 ▲3.3341.93 ▼3.98
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0136.49 ▼4.8436.12 ▲0.30
Add New Post /wp-admin/post-new.php1,530 ▲1623.11 ▲5.55679.60 ▼13.0254.02 ▼5.30
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0797.51 ▼3.1742.67 ▼2.22

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Teamgate\\Model\\Model' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Model/People.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Teamgate\\Model\\Model' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Model/Companies.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Teamgate\\Model\\Model' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Model/Events.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Teamgate\\Model\\Model' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Model/Leads.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Teamgate\\Model\\Model' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Model/Deals.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Teamgate\\Transport\\Transport' not found in wp-content/plugins/teamgate-crm-forms/php-sdk/src/Transport/Curl.php:7

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

teamgate-crm-forms/teamgate.php 77% from 13 tests

Analyzing the main PHP file in "Teamgate CRM Forms for WordPress" version 1.6.3
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("teamgate-crm-forms.php" instead of "teamgate.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin914 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP20185204792
Markdown115099
JSON20023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity4.93
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3489.47%
▷ Protected methods25.26%
▷ Private methods25.26%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin