84% simple-customer-crm

Code Review | Simple Customer CRM Plugin

WordPress plugin Simple Customer CRM Plugin scored84%from 54 tests.

About plugin

  • Plugin page: simple-customer-crm
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.3
  • WordPress version: 6.3.1
  • First release: Oct 31, 2019
  • Latest release: Mar 5, 2020
  • Number of updates: 4
  • Update frequency: every 31.8 days
  • Top authors: tristup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /478 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.64ms] Passed 4 tests

An overview of server-side resources used by Simple Customer CRM Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.33 ▼4.67
Dashboard /wp-admin3.35 ▲0.0159.06 ▼3.51
Posts /wp-admin/edit.php3.41 ▲0.0550.30 ▲0.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.03 ▼22.86
Media Library /wp-admin/upload.php3.28 ▲0.0537.38 ▲4.30
Customers /wp-admin/edit.php?post_type=sccrm_customer3.3237.72
Categories /wp-admin/edit-tags.php?taxonomy=customer_category&post_type=sccrm_customer3.3635.42
Tags /wp-admin/edit-tags.php?taxonomy=customer_tag&post_type=sccrm_customer3.2736.97

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Customer CRM Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲19713.65 ▼0.727.51 ▲5.8653.82 ▲12.50
Dashboard /wp-admin2,231 ▲435.89 ▼0.0797.78 ▼5.4640.43 ▼4.54
Posts /wp-admin/edit.php2,117 ▲282.03 ▲0.0639.66 ▼0.0435.26 ▼0.33
Add New Post /wp-admin/post-new.php1,556 ▲3723.75 ▲0.49694.36 ▲91.0963.29 ▲11.89
Media Library /wp-admin/upload.php1,416 ▲314.22 ▲0.02110.65 ▲7.4848.55 ▲3.59
Customers /wp-admin/edit.php?post_type=sccrm_customer1,1372.0037.0331.43
Categories /wp-admin/edit-tags.php?taxonomy=customer_category&post_type=sccrm_customer1,2932.1325.4128.81
Tags /wp-admin/edit-tags.php?taxonomy=customer_tag&post_type=sccrm_customer1,2872.1426.4527.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/simple-customer-crm/template/customer-form.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: The official readme.txt is a good inspiration

simple-customer-crm/simple-customer-crm.php 92% from 13 tests

"Simple Customer CRM Plugin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
There were no executable files found in this plugin1,679 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22461871,265
PHP22238383
CSS20431

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin