78% quick-quotes-wpshare247

Code Review | Quick quotes - WPSHARE247

WordPress plugin Quick quotes - WPSHARE247 scored78%from 54 tests.

About plugin

  • Plugin page: quick-quotes-wpsh...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Jul 30, 2021
  • Latest release: Jul 30, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: website366 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.31MB] [CPU: ▼6.34ms] Passed 4 tests

Server-side resources used by Quick quotes - WPSHARE247
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2728.85 ▼18.41
Dashboard /wp-admin3.66 ▲0.3158.73 ▼11.02
Posts /wp-admin/edit.php3.73 ▲0.3757.16 ▲7.42
Add New Post /wp-admin/post-new.php6.24 ▲0.35100.92 ▼3.35
Media Library /wp-admin/upload.php3.56 ▲0.3246.39 ▲11.79
Quote Requests /wp-admin/edit.php?post_type=req_quote_qqfs_pt3.5945.59
Configure QQFS /wp-admin/admin.php?page=ws247-quick-quote-options3.5846.76
Quotes /wp-admin/edit.php?post_type=quote_qqfs_pt3.5943.95

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Quick quotes - WPSHARE247
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.39 ▼0.968.21 ▲5.8339.56 ▼3.07
Dashboard /wp-admin2,232 ▲585.53 ▼0.0085.46 ▼18.6641.39 ▼8.53
Posts /wp-admin/edit.php2,140 ▲372.01 ▲0.0636.32 ▼0.4636.87 ▲1.10
Add New Post /wp-admin/post-new.php1,560 ▲3423.12 ▼0.50647.57 ▼40.6157.45 ▲0.35
Media Library /wp-admin/upload.php1,443 ▲434.29 ▲0.1296.62 ▼6.4643.86 ▼0.47
Quote Requests /wp-admin/edit.php?post_type=req_quote_qqfs_pt1,1271.9339.2331.30
Configure QQFS /wp-admin/admin.php?page=ws247-quick-quote-options1,8971.8230.7665.18
Quotes /wp-admin/edit.php?post_type=quote_qqfs_pt1,1111.9333.2730.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-quotes-wpshare247/inc/class.setting.page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/quick-quotes-wpshare247/inc/define.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/quick-quotes-wpshare247/inc/templates/frontend/form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/quick-quotes-wpshare247/inc/templates/frontend/email.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/quick-quotes-wpshare247/inc/tabs/tab_pro_general.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/quick-quotes-wpshare247/inc/templates/frontend/quote.php:2
    • > PHP Warning
      Use of undefined constant WS247_QUOTE_QQFS_SETTING_PAGE_SLUG - assumed 'WS247_QUOTE_QQFS_SETTING_PAGE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/quick-quotes-wpshare247/inc/class.setting.page.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/quick-quotes-wpshare247/inc/shortcode/shortcode_index.php:9
    • > PHP Warning
      Use of undefined constant WS247_QUOTE_QQFS_PLUGIN_INC_DIR - assumed 'WS247_QUOTE_QQFS_PLUGIN_INC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/quick-quotes-wpshare247/inc/define.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-quotes-wpshare247/inc/theme_functions.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=quote_qqfs_pt
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at ws247_create_quote_qqfs_sortable (/wp-content/plugins/quick-quotes-wpshare247/assets/js/ws247_quote_qqfs_admin.js?ver=1.0:76:51)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/quick-quotes-wpshare247/assets/js/ws247_quote_qqfs_admin.js?ver=1.0:4:2)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=quote_qqfs_pt
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function

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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === quick-quotes-wpshare247 === )
You can look at the official readme.txt

quick-quotes-wpshare247/quick-quotes-wpshare247.php 92% from 13 tests

"Quick quotes - WPSHARE247" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,056 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP142231011,573
CSS21873984
JavaScript2373342
PO File1710157

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods65
▷ Static methods1523.08%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected