83% wp-sugar-free

Code Review | WordPress SugarCRM

WordPress plugin WordPress SugarCRM scored83%from 54 tests.

About plugin

  • Plugin page: wp-sugar-free
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Sep 19, 2022
  • Number of updates: 35
  • Update frequency: every 94.1 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

40+ active /9,335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WordPress SugarCRM
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.47 ▲0.86
Dashboard /wp-admin3.35 ▲0.0456.16 ▼3.79
Posts /wp-admin/edit.php3.46 ▲0.1052.82 ▲3.44
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.22 ▼25.03
Media Library /wp-admin/upload.php3.27 ▲0.0440.37 ▲2.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
WpLeadBuilderProActivatedPlugin
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress SugarCRM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.031.94 ▲0.1243.69 ▲1.57
Dashboard /wp-admin2,198 ▲245.63 ▲0.0383.85 ▼4.2242.04 ▲1.18
Posts /wp-admin/edit.php2,100 ▲31.97 ▼0.0935.24 ▼3.7431.47 ▼4.09
Add New Post /wp-admin/post-new.php1,536 ▲223.31 ▲0.29674.17 ▲56.1156.68 ▲0.59
Media Library /wp-admin/upload.php1,403 ▲34.23 ▼0.02107.23 ▼3.6048.28 ▲2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • WpLeadBuilderProActivatedPlugin
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.wsdlcache.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.xmlschema.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soap_val.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soap_server.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soap_parser.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/nusoapmime.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soapclient.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soap_transport_http.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.soap_fault.php
    • > /wp-content/plugins/wp-sugar-free/lib/nusoap/class.wsdl.php

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 90% from 29 tests

readme.txt 94% 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 your attention:
  • Screenshots: Please add an image for screenshot #1 (The screenshot-1.jpg shows the SugarCRM settings configuration)
Please take inspiration from this readme.txt

wp-sugar-free/index.php 85% from 13 tests

The primary PHP file in "WordPress SugarCRM" version 2.0.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-sugar-free.php" instead of "index.php")

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
There were no executable files found in this plugin11,762 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,6976,97711,762

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity73.54
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.43
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods362
▷ Static methods20.55%
▷ Public methods36199.72%
▷ Protected methods00.00%
▷ Private methods10.28%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/wordpress-to-sugarcrm-banner.png112.98KB35.58KB▼ 68.50%