83% ni-crm-lead

Code Review | Ni CRM Lead

WordPress plugin Ni CRM Lead scored83%from 54 tests.

About plugin

  • Plugin page: ni-crm-lead
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2015
  • Latest release: Feb 19, 2023
  • Number of updates: 17
  • Update frequency: every 168.2 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,795 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.06MB] [CPU: ▼6.84ms] Passed 4 tests

A check of server-side resources used by Ni CRM Lead
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.10 ▼6.18
Dashboard /wp-admin3.37 ▲0.0750.88 ▼3.73
Posts /wp-admin/edit.php3.42 ▲0.0650.62 ▲2.45
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.00 ▼19.91
Media Library /wp-admin/upload.php3.29 ▲0.0640.12 ▲3.75
Service /wp-admin/edit-tags.php?taxonomy=service_master&post_type=lead_master3.3838.37
Product /wp-admin/edit-tags.php?taxonomy=product_master&post_type=lead_master3.2935.88
Follow Up /wp-admin/edit.php?post_type=lead_master&page=follow_up3.3242.02
Add New /wp-admin/post-new.php?post_type=lead_master3.3349.81
Lead /wp-admin/edit.php?post_type=lead_master3.3447.57
Status /wp-admin/edit-tags.php?taxonomy=status_master&post_type=lead_master3.2936.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ni CRM Lead
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲12413.76 ▼0.611.87 ▲0.0742.15 ▼4.54
Dashboard /wp-admin2,254 ▲775.70 ▲0.1698.00 ▼3.8240.42 ▼2.84
Posts /wp-admin/edit.php2,168 ▲682.59 ▲0.5640.65 ▲3.7836.22 ▲1.19
Add New Post /wp-admin/post-new.php1,578 ▲5221.37 ▼1.63693.91 ▲14.4731.03 ▼28.98
Media Library /wp-admin/upload.php1,468 ▲745.13 ▲0.96114.80 ▲10.6744.87 ▲2.99
Service /wp-admin/edit-tags.php?taxonomy=service_master&post_type=lead_master1,3422.2535.3731.59
Product /wp-admin/edit-tags.php?taxonomy=product_master&post_type=lead_master1,3422.5235.5334.05
Follow Up /wp-admin/edit.php?post_type=lead_master&page=follow_up9872.1733.0428.18
Add New /wp-admin/post-new.php?post_type=lead_master1,8853.5260.5331.65
Lead /wp-admin/edit.php?post_type=lead_master1,1972.5535.5628.95
Status /wp-admin/edit-tags.php?taxonomy=status_master&post_type=lead_master1,3422.2434.8032.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=status_master&post_type=lead_master
    • > Network (severe)
    wp-content/plugins/ni-crm-lead/css/images/notice.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% 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:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Add New Lead), #2 (Lead List.), #3 (How to add Follow up.), #4 (Add Follow Up.)
The official readme.txt might help

ni-crm-lead/ni-crm.php 92% from 13 tests

The main file in "Ni CRM Lead" v. 1.2.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ni-crm-lead.php" instead of "ni-crm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,792 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS340581,232
PHP46865498
JavaScript2192162

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.67
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.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

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.28MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/lead.png0.74KB0.73KB▼ 1.06%
images/delete.png1.33KB1.43KB0.00%
screenshot-3.png59.70KB18.94KB▼ 68.27%
images/notice.png0.46KB0.48KB0.00%
screenshot-1.png108.40KB32.82KB▼ 69.73%