68% autoglasscrm-quote-request

Code Review | AutoGlassCRM Quote Request

WordPress plugin AutoGlassCRM Quote Request scored68%from 54 tests.

About plugin

  • Plugin page: autoglasscrm-quot...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2021
  • Latest release: Jul 2, 2021
  • Number of updates: 20
  • Update frequency: every 6.4 days
  • Top authors: autoglasscrm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /444 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.74MB] [CPU: ▼50.33ms] Passed 4 tests

Analyzing server-side resources used by AutoGlassCRM Quote Request
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.214.89 ▼36.07
Dashboard /wp-admin2.27 ▼1.037.33 ▼39.17
Posts /wp-admin/edit.php2.27 ▼1.097.08 ▼39.39
Add New Post /wp-admin/post-new.php2.27 ▼3.626.87 ▼86.70
Media Library /wp-admin/upload.php2.27 ▼0.966.28 ▼29.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_autoglasscrm_quote_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

AutoGlassCRM Quote Request: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.65 ▼1.117.01 ▲5.2142.99 ▼0.23
Dashboard /wp-admin2,226 ▲344.86 ▼1.07112.15 ▲1.5438.22 ▼6.80
Posts /wp-admin/edit.php2,112 ▲232.02 ▲0.0139.38 ▲0.4434.66 ▲1.44
Add New Post /wp-admin/post-new.php1,530 ▲1622.78 ▲5.16661.82 ▼47.2356.44 ▲5.86
Media Library /wp-admin/upload.php1,411 ▲234.17 ▼0.0395.15 ▼7.9840.02 ▼6.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the agc_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_autoglasscrm_quote_widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/autoglasscrm-quote-request/Helpers/states/AU.php
    • > /wp-content/plugins/autoglasscrm-quote-request/Helpers/states/US.php
    • > /wp-content/plugins/autoglasscrm-quote-request/templates/form.php
    • > /wp-content/plugins/autoglasscrm-quote-request/Helpers/states/CA.php
    • > /wp-content/plugins/autoglasscrm-quote-request/Helpers/states/MX.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'QuoteHelpers\\AddressLocalize' not found in wp-content/plugins/autoglasscrm-quote-request/templates/form.php:367
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autoglasscrm-quote-request/autoglasscrm-quote.php:15

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Create a new page and name the page quote request and publish the page.), #2 (Go to Appearance->Widgets, under available widgets you will see Request Quote.), #3 (Drag Request quote widget to widget for shortcodes.)
You can take inspiration from this readme.txt

autoglasscrm-quote-request/autoglasscrm-quote.php 92% from 13 tests

"AutoGlassCRM Quote Request" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("autoglasscrm-quote-request.php" instead of "autoglasscrm-quote.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,414 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43124021,904
PHP9288431,480
CSS16030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
No PNG images were found in this plugin