78% wp-easy-crm

Code Review | Easy CRM

WordPress plugin Easy CRM scored78%from 54 tests.

About plugin

  • Plugin page: wp-easy-crm
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.0
  • WordPress version: 6.3.1
  • First release: Mar 14, 2023
  • Latest release: Mar 30, 2023
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: sunnysonic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.98ms] Passed 4 tests

This is a short check of server-side resources used by Easy CRM
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.57 ▲3.00
Dashboard /wp-admin3.34 ▲0.0443.04 ▼3.92
Posts /wp-admin/edit.php3.39 ▲0.0447.80 ▲5.78
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.06 ▼8.20
Media Library /wp-admin/upload.php3.26 ▲0.0436.00 ▲1.22
Tasks /wp-admin/admin.php?page=wp-easy-crm-tasks3.3234.85
Add ClientLog /wp-admin/admin.php?page=wp-easy-crm-addclientlog3.3230.74
Forms /wp-admin/admin.php?page=wp-easy-crm-forms3.2727.96
Quote Invoice View /wp-admin/admin.php?page=wp-easy-crm-quoteview3.3226.22
Client Profile /wp-admin/admin.php?page=wp-easy-crm-perfil3.3433.22
Settings /wp-admin/admin.php?page=wp-easy-crm-settings3.2930.45
Add Client /wp-admin/admin.php?page=wp-easy-crm-addclient3.3332.16
Add Task /wp-admin/admin.php?page=wp-easy-crm-addquote3.4532.71
Contacts /wp-admin/admin.php?page=wp-easy-crm3.3030.35
Quotes / Invoices /wp-admin/admin.php?page=wp-easy-crm-quotes3.2930.05

Server storage [IO: ▲1.76MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 31 new files
Database: 5 new tables, 7 new options
New tables
wp_clients
wp_quoteclient
wp_lineitemquote
wp_logclient
wp_task
New WordPress options
widget_recent-posts
clients_db_version
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Easy CRM
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲12115.95 ▲1.301.79 ▲0.0443.60 ▲3.94
Dashboard /wp-admin2,278 ▲897.10 ▲1.06186.99 ▲81.1338.71 ▼1.64
Posts /wp-admin/edit.php2,134 ▲484.05 ▲2.0163.67 ▲28.2336.99 ▲0.79
Add New Post /wp-admin/post-new.php1,705 ▲17028.28 ▲5.03633.51 ▼43.6628.96 ▼21.33
Media Library /wp-admin/upload.php1,433 ▲485.99 ▲1.78121.56 ▲14.1640.61 ▼3.81
Tasks /wp-admin/admin.php?page=wp-easy-crm-tasks8673.6547.6027.97
Add ClientLog /wp-admin/admin.php?page=wp-easy-crm-addclientlog8263.6647.0823.52
Forms /wp-admin/admin.php?page=wp-easy-crm-forms9253.6744.5627.49
Quote Invoice View /wp-admin/admin.php?page=wp-easy-crm-quoteview8933.6647.9024.39
Client Profile /wp-admin/admin.php?page=wp-easy-crm-perfil9203.5648.8939.36
Settings /wp-admin/admin.php?page=wp-easy-crm-settings1,96411.09175.9067.88
Add Client /wp-admin/admin.php?page=wp-easy-crm-addclient1,1503.7145.4723.70
Add Task /wp-admin/admin.php?page=wp-easy-crm-addquote1,8419.04152.8946.24
Contacts /wp-admin/admin.php?page=wp-easy-crm7703.6747.9720.43
Quotes / Invoices /wp-admin/admin.php?page=wp-easy-crm-quotes7893.5649.0624.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-quotes
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-quotes
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • 39 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-addquote
    • > Notice in wp-content/plugins/wp-easy-crm/views/addQuote.php+355
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-addclientlog
    • > Notice in wp-content/plugins/wp-easy-crm/views/addClientLog.php+173
    Undefined variable: row_details_log
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-settings
    • > Notice in wp-content/plugins/wp-easy-crm/views/settings.php+43
    Undefined variable: settings_updated
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-quoteview
    • > Notice in wp-content/plugins/wp-easy-crm/views/quoteView.php+215
    Undefined variable: quotedetail
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-quoteview
    • > Notice in wp-content/plugins/wp-easy-crm/views/quoteView.php+107
    Undefined variable: msg
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-quoteview
    • > Notice in wp-content/plugins/wp-easy-crm/views/quoteView.php+163
    Undefined variable: lineitems
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-settings
    • > Notice in wp-content/plugins/wp-easy-crm/views/settings.php+62
    Undefined index: introduction
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-addquote
    • > Notice in wp-content/plugins/wp-easy-crm/views/addQuote.php+340
    Undefined variable: row_details_Quote
    • > GET request to /wp-admin/admin.php?page=wp-easy-crm-addquote
    • > Notice in wp-content/plugins/wp-easy-crm/views/addQuote.php+401
    Undefined variable: row_details_LineItems

SRP 50% 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 fix the following
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/addClient.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-easy-crm/views/addClient.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-easy-crm/views/listClients.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/tasks.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/listClients.php on line 9
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/addQuote.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-easy-crm/views/addTask.php:9
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/listClients.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-easy-crm/views/addQuote.php:11
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-easy-crm/views/listClients.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: tasks, crm, invoices, quotes, leads

wp-easy-crm/easy-crm.php 92% from 13 tests

"Easy CRM" version 1.0.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-easy-crm.php" instead of "easy-crm.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 detected2,625 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP126801612,150
PO File1181193471
JavaScript23193
CSS13111

PHP code Passed 2 tests

This is a short overview 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.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png6.44KB3.05KB▼ 52.64%
assets/icon-128x128.png6.15KB2.76KB▼ 55.03%