10% apptivo-business-site

Code Review | Apptivo Business Site CRM

WordPress plugin Apptivo Business Site CRM scored 10% from 54 tests.

About plugin

  • Plugin page: apptivo-business-...
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2012
  • Latest release: Mar 15, 2023
  • Number of updates: 118
  • Update frequency: every 34.5 days
  • Top authors: rmohanasundaram (56.78%)apptivo (29.66%)prabhuganapathy (15.25%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 11,384 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/ContactForms.php+31
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼47.69ms] Passed 4 tests

An overview of server-side resources used by Apptivo Business Site CRM
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.436.66 ▼31.60
Dashboard /wp-admin2.05 ▼1.258.68 ▼36.14
Posts /wp-admin/edit.php2.05 ▼1.318.26 ▼39.73
Add New Post /wp-admin/post-new.php2.05 ▼3.847.32 ▼83.30
Media Library /wp-admin/upload.php2.05 ▼1.187.24 ▼25.93
Cases /wp-admin/admin.php?page=awp_cases2.058.68
Testimonials /wp-admin/admin.php?page=awp_testimonials2.059.38
Contact Forms /wp-admin/admin.php?page=awp_contactforms2.057.14
Newsletter /wp-admin/admin.php?page=awp_newsletter2.058.62
Jobs /wp-admin/admin.php?page=awp_jobs2.059.32
General Settings /wp-admin/admin.php?page=awp_general2.059.86
IP Deny /wp-admin/admin.php?page=awp_ip_deny2.0514.60

Server storage [IO: ▲3.79MB] [DB: ▲0.33MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • Illegal file modification found: 1 file (0.16KB) outside of "wp-content/plugins/apptivo-business-site/" and "wp-content/uploads/"
    • (new file) wp-admin/Restapicall.log
Filesystem: 129 new files
Database: 1 new table, 11 new options
New tables
wp_absp_ipdeny
New WordPress options
widget_recent-posts
can_compress_scripts
awp_casesforms
db_upgraded
apptivo_business_plugin_installed
widget_recent-comments
apptivo_business_plugin_version
widget_theysaidso_widget
jal_db_version
awp_memcache_settings
...

Browser metrics Passed 4 tests

An overview of browser requirements for Apptivo Business Site CRM
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11813.25 ▼1.121.74 ▼0.0543.29 ▲2.21
Dashboard /wp-admin2,270 ▲1215.07 ▼0.63103.94 ▲1.9279.27 ▲41.84
Posts /wp-admin/edit.php2,153 ▲642.23 ▲0.2434.34 ▼4.6434.25 ▼3.01
Add New Post /wp-admin/post-new.php1,722 ▲18921.49 ▼1.72762.44 ▲87.6948.78 ▲2.72
Media Library /wp-admin/upload.php1,446 ▲584.41 ▲0.1997.28 ▲0.7980.16 ▲39.04
Cases /wp-admin/admin.php?page=awp_cases8832.1131.8627.23
Testimonials /wp-admin/admin.php?page=awp_testimonials7201.7412.0018.94
Contact Forms /wp-admin/admin.php?page=awp_contactforms8942.1630.4026.18
Newsletter /wp-admin/admin.php?page=awp_newsletter7171.6011.9516.92
Jobs /wp-admin/admin.php?page=awp_jobs7201.7412.7521.78
General Settings /wp-admin/admin.php?page=awp_general1,4132.1034.6526.03
IP Deny /wp-admin/admin.php?page=awp_ip_deny9201.9933.2123.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.33MB] 25% 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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/ContactForms.php+31
    Trying to access array offset on value of type bool
  • Zombie tables were found after uninstall: 1 table
    • wp_absp_ipdeny
  • Zombie WordPress options detected upon uninstall: 11 options
    • awp_casesforms
    • can_compress_scripts
    • jal_db_version
    • widget_theysaidso_widget
    • apptivo_business_plugin_installed
    • db_upgraded
    • widget_recent-comments
    • apptivo_business_plugin_version
    • awp_memcache_settings
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 81 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_ip_deny
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/Testimonials.php+25
    Trying to access array offset on value of type bool
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_ip_deny
    • > Notice in wp-content/plugins/apptivo-business-site/apptivo-businesssite-plugin.php+180
    Undefined index: activate
    • > GET request to /wp-admin/admin.php?page=awp_cases
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/cases.php+768
    Undefined index: awp_cases_settings
    • > GET request to /wp-admin/admin.php?page=awp_contactforms
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/ContactForms.php+1088
    Undefined index: awp_contactform_settings
    • > GET request to /wp-admin/admin.php?page=awp_jobs
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/jobs.php+988
    Trying to get property 'categories' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_jobs
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/jobs.php+990
    Trying to get property 'statuses' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+427
    Undefined index: awp_siteinfo_form
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+510
    Undefined index: awp_generalform_commonplugin_settings
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+813
    Trying to get property 'awp_captcha_type' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+820
    Trying to get property 'awp_fg_color' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+824
    Trying to get property 'awp_bg_color' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+834
    Trying to get property 'recaptcha_mode' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+849
    Trying to get property 'recaptcha_publickey' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+850
    Trying to get property 'recaptcha_privatekey' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+870
    Trying to get property 'recaptcha_theme' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+883
    Trying to get property 'recaptcha_language' of non-object
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+911
    Undefined index: awp_proxy_settings
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+643
    Undefined index: awp_memcache_settings
    • > GET request to /wp-admin/admin.php?page=awp_general
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/AWPMainController.php+663
    Undefined index: awp_memcache_test
    • > GET request to /wp-admin/admin.php?page=awp_ip_deny
    • > Notice in wp-content/plugins/apptivo-business-site/lib/Plugin/ipdeny.php+60
    Undefined index: absp_ip

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/apptivo-business-site/inc/jobs/templates/joblists/joblistsanddesc.php
    • > /wp-content/plugins/apptivo-business-site/inc/jobs/templates/joblists/joblists.php
    • > /wp-content/plugins/apptivo-business-site/inc/testimonials/templates/sliderview1.php
  • 221× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/apptivo-business-site/inc/testimonials/templates/default-testimonials.php on line 20
    • > PHP Notice
      Undefined variable: testimonialform in wp-content/plugins/apptivo-business-site/inc/testimonials/templates/frontend/defaulttemplate.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/apptivo-business-site/inc/testimonials/templates/sliderview1.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/apptivo-business-site/inc/config.php:20
    • > PHP Notice
      Undefined variable: allJobs in wp-content/plugins/apptivo-business-site/inc/jobs/templates/joblists/joblists.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/apptivo-business-site/inc/testimonials/templates/single-column-layout1.php:37
    • > PHP Notice
      Undefined variable: contactform in wp-content/plugins/apptivo-business-site/inc/contact-forms/templates/double-column-layout1-us-phone.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/apptivo-business-site/inc/newsletter/templates/single-column-layout2_usphone.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/apptivo-business-site/inc/cases/templates/double-column-layout.php on line 17
    • > PHP Notice
      Undefined variable: cases_width_size in wp-content/plugins/apptivo-business-site/inc/cases/templates/single-column-layout1.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg)
The official readme.txt might help

apptivo-business-site/apptivo-businesssite-plugin.php 85% from 13 tests

The main PHP script in "Apptivo Business Site CRM" version 4.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("apptivo-business-site.php" instead of "apptivo-businesssite-plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin26,849 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP783,3783,34222,510
JavaScript84071984,204
CSS270135

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 206)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity54.81
▷ Minimum class complexity1.00
▷ Maximum class complexity405.00
Average method complexity8.15
▷ Minimum method complexity1.00
▷ Maximum method complexity206.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods271
▷ Static methods00.00%
▷ Public methods27099.63%
▷ Protected methods00.00%
▷ Private methods10.37%
Functions186
▷ Named functions18599.46%
▷ Anonymous functions10.54%
Constants79
▷ Global constants79100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.34MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/jscolor/hv.png2.80KB7.32KB0.00%
assets/images/contact.png26.90KB11.91KB▼ 55.71%
assets/js/jscolor/hs.png2.62KB7.54KB0.00%
assets/images/news.png41.21KB18.49KB▼ 55.14%
assets/images/events.png41.34KB18.56KB▼ 55.10%