89% wp-freshsales

Code Review | WP Freshsales

WordPress plugin WP Freshsales scored 89% from 54 tests.

About plugin

  • Plugin page: wp-freshsales
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Sep 14, 2017
  • Latest release: Jan 12, 2022
  • Number of updates: 12
  • Update frequency: every 133.0 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Analyzing server-side resources used by WP Freshsales
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0429.49 ▲6.48
Dashboard /wp-admin3.10 ▲0.0330.54 ▼7.24
Posts /wp-admin/edit.php3.15 ▲0.0430.87 ▼0.93
Add New Post /wp-admin/post-new.php5.46 ▲0.0270.10 ▼728.25
Media Library /wp-admin/upload.php3.04 ▲0.0423.38 ▼2.72

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
WpLeadBuilderProActivatedPlugin

Browser metrics Passed 4 tests

A check of browser resources used by WP Freshsales
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.61 ▲0.004.97 ▼4.1774.97 ▲0.91
Dashboard /wp-admin2,930 ▲316.10 ▼0.04116.24 ▼20.69166.54 ▼7.70
Posts /wp-admin/edit.php2,743 ▼03.24 ▼0.0163.16 ▲0.10140.70 ▲2.23
Add New Post /wp-admin/post-new.php3,807 ▲6618.14 ▼1.05451.43 ▲8.05166.67 ▲6.62
Media Library /wp-admin/upload.php1,752 ▲35.47 ▼0.05151.70 ▲5.73192.88 ▲4.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • WpLeadBuilderProActivatedPlugin

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Wp Freshsales configuratios.)
The official readme.txt might help

wp-freshsales/index.php 85% from 13 tests

This is the main PHP file of "WP Freshsales" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-freshsales.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected731 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7116165731

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.50
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods45
▷ Static methods817.78%
▷ Public methods4088.89%
▷ Protected methods00.00%
▷ Private methods511.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-01.png27.05KB11.81KB▼ 56.36%
assets/wordpress-to-freshsale-banner.png184.45KB81.12KB▼ 56.02%