68% crm-perks-forms

Code Review | CRM Perks Forms - Wordpress Form Builder

WordPress plugin CRM Perks Forms - Wordpress Form Builder scored68%from 54 tests.

About plugin

  • Plugin page: crm-perks-forms
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2018
  • Latest release: Oct 31, 2023
  • Number of updates: 25
  • Update frequency: every 80.5 days
  • Top authors: CRMPerks (92%)asif876 (12%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /22,733 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by CRM Perks Forms - Wordpress Form Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.41 ▲0.48
Dashboard /wp-admin3.37 ▲0.0247.47 ▼19.47
Posts /wp-admin/edit.php3.48 ▲0.1245.48 ▼4.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.56 ▼10.48
Media Library /wp-admin/upload.php3.28 ▲0.0634.72 ▼0.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 190 new files
Database: 1 new table, 8 new options
New tables
wp_cfx_form_forms
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
cfx_form_plugin_version
db_upgraded
widget_recent-comments
crm_perks_upload_folder

Browser metrics Passed 4 tests

CRM Perks Forms - Wordpress Form Builder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.35 ▼0.281.73 ▲0.1941.73 ▲1.88
Dashboard /wp-admin2,229 ▲515.56 ▼0.1285.78 ▼13.0237.67 ▼1.93
Posts /wp-admin/edit.php2,137 ▲371.97 ▼0.0433.86 ▼5.8133.15 ▼4.08
Add New Post /wp-admin/post-new.php1,551 ▲1718.34 ▼0.04599.05 ▼0.2264.80 ▲1.89
Media Library /wp-admin/upload.php1,440 ▲374.23 ▼0.0297.81 ▼2.6639.35 ▼4.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_cfx_form_forms
  • The uninstall procedure has failed, leaving 8 options in the database
    • crm_perks_upload_folder
    • widget_recent-posts
    • cfx_form_plugin_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/crm-perks-forms/images/captcha.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crm-perks-forms/includes/editor-btn.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/crm-perks-forms/crm-perks-forms.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: best form builder, free form builder, contact form, visual form builder, form builder

crm-perks-forms/crm-perks-forms.php Passed 13 tests

"CRM Perks Forms - Wordpress Form Builder" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Create beautiful contact forms , popups with floating buttons.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin13,394 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,05869,3339,689
CSS91061001,817
JavaScript101313461,063
SVG100640
LESS174185

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 154)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity120.12
▷ Minimum class complexity4.00
▷ Maximum class complexity449.00
Average method complexity8.88
▷ Minimum method complexity1.00
▷ Maximum method complexity154.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods121
▷ Static methods3528.93%
▷ Public methods10687.60%
▷ Protected methods97.44%
▷ Private methods64.96%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
127 PNG files occupy 2.46MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bg-light.png115.51KB125.23KB0.00%
css/box-5/images/border.png0.14KB0.16KB0.00%
images/icons/chat13.png0.55KB0.35KB▼ 36.70%
css/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
images/themes/colored-border-light-bg.png22.08KB23.75KB0.00%