89% wp-freshsales

Code Review | Freshsales Integration for WordPress

WordPress plugin Freshsales Integration for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: wp-freshsales
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Oct 18, 2023
  • Number of updates: 18
  • Update frequency: every 124.4 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,437 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.33ms] Passed 4 tests

This is a short check of server-side resources used by Freshsales Integration for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.07 ▲3.32
Dashboard /wp-admin3.31 ▼0.0358.51 ▼1.75
Posts /wp-admin/edit.php3.36 ▲0.0146.28 ▼3.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.55 ▼13.78
Media Library /wp-admin/upload.php3.23 ▲0.0135.48 ▲2.06

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
WpLeadBuilderProActivatedPlugin
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Freshsales Integration for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.16 ▼0.371.81 ▲0.0742.20 ▲6.40
Dashboard /wp-admin2,195 ▲235.52 ▼0.2283.50 ▼20.0338.45 ▼6.63
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0035.33 ▲0.3532.98 ▼2.37
Add New Post /wp-admin/post-new.php1,526 ▼023.48 ▲0.36680.19 ▼8.3960.37 ▲3.53
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0592.23 ▼16.6842.46 ▲0.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • WpLeadBuilderProActivatedPlugin

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Wp Freshsales configuratios.) image required
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The principal PHP file in "Freshsales Integration for WordPress" v. 2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-freshsales.php" instead of "index.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected733 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7118167733

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
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.28MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/wordpress-to-freshsale-banner.png184.45KB81.12KB▼ 56.02%
screenshot-01.png99.49KB32.17KB▼ 67.67%