62% tools4shuls

Code Review | Tools4Shuls

WordPress plugin Tools4Shuls scored62%from 54 tests.

About plugin

  • Plugin page: tools4shuls
  • Plugin version: 1.2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Apr 2, 2020
  • Number of updates: 72
  • Update frequency: every 24.0 days
  • Top authors: tools4shuls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,077 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.87MB] [CPU: ▼0.24ms] Passed 4 tests

Analyzing server-side resources used by Tools4Shuls
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8247.70 ▲2.07
Dashboard /wp-admin4.19 ▲0.8958.14 ▲2.33
Posts /wp-admin/edit.php4.24 ▲0.8951.60 ▲0.69
Add New Post /wp-admin/post-new.php6.77 ▲0.8992.41 ▼6.05
Media Library /wp-admin/upload.php4.11 ▲0.8944.81 ▲8.68
Tools 4 Shuls /wp-admin/admin.php?page=t4s4.0837.85
T4S Form Creator /wp-admin/admin.php?page=t4s-form-creator4.0635.72
Installation and Shortcodes /wp-admin/admin.php?page=t4s-installation-and-shortcodes4.1333.51
Switch T4S Account /wp-admin/admin.php?page=t4s-switch-accounts4.0838.52
T4S Settings /wp-admin/admin.php?page=t4s-settings4.0834.45
T4S Form Payments /wp-admin/admin.php?page=t4s-form-payments4.1139.86

Server storage [IO: ▲0.30MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: 6 new tables, 23 new options
New tables
t4s_forms_submissions
t4s_authorize_payments
t4s_forms_options
t4s_paypal_payments
t4s_forms_fields
t4s_forms
New WordPress options
db_upgraded
t4s_hash
t4s_payment_processor
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
t4s_cookie
t4s_auth_md5
t4s_auth_id
t4s_auth_key
...

Browser metrics Passed 4 tests

Checking browser requirements for Tools4Shuls
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.39 ▼0.341.91 ▼0.4243.95 ▲1.37
Dashboard /wp-admin2,241 ▲615.62 ▲0.0696.06 ▲3.7442.24 ▼0.34
Posts /wp-admin/edit.php2,146 ▲462.10 ▲0.1134.61 ▼3.4533.27 ▼3.80
Add New Post /wp-admin/post-new.php1,560 ▲3423.26 ▲0.09681.75 ▼12.3255.76 ▲2.00
Media Library /wp-admin/upload.php1,443 ▲464.20 ▲0.0599.71 ▼9.1142.04 ▼5.31
Tools 4 Shuls /wp-admin/admin.php?page=t4s7501.127.1321.26
T4S Form Creator /wp-admin/admin.php?page=t4s-form-creator8562.0023.9435.08
Installation and Shortcodes /wp-admin/admin.php?page=t4s-installation-and-shortcodes8482.0023.0226.44
Switch T4S Account /wp-admin/admin.php?page=t4s-switch-accounts8422.0323.8431.61
T4S Settings /wp-admin/admin.php?page=t4s-settings1,4322.1311.7328.21
T4S Form Payments /wp-admin/admin.php?page=t4s-form-payments8082.0324.4927.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • t4s_forms_options
    • t4s_authorize_payments
    • t4s_forms_fields
    • t4s_forms
    • t4s_paypal_payments
    • t4s_forms_submissions
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_t4s_widget2
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_t4s_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+33
    Undefined index: editform
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=t4s-switch-accounts
    • > Notice in wp-content/plugins/tools4shuls/includes/t4s_credentials_form.php+11
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+275
    Undefined variable: ch1
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+276
    Undefined variable: ch2
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+277
    Undefined variable: ch3
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+278
    Undefined variable: dollars
    • > GET request to /wp-admin/admin.php?page=t4s-form-creator
    • > Notice in wp-content/plugins/tools4shuls/includes/forms/t4s_form_creator.php+346
    Undefined variable: msg
    • > GET request to /wp-admin/admin.php?page=t4s-switch-accounts
    • > Notice in wp-content/plugins/tools4shuls/includes/t4s_credentials_form.php+11
    Undefined variable: t4s_creds
    • > GET request to /wp-admin/admin.php?page=t4s-form-payments
    • > Notice in wp-content/plugins/tools4shuls/includes/t4s_payment_processing.php+466
    Undefined variable: records_free

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tools4shuls/includes/t4s_credentials_form.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/tools4shuls/t4s_switch_account.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tools4shuls/includes/t4s_credentials_form.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tools4shuls/t4s.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/tools4shuls/t4s_main.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/tools4shuls/includes/lib/Authorize/AuthorizeNetARB.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tools4shuls/includes/t4s_common.php:381
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/tools4shuls/includes/lib/Authorize/AuthorizeNetAIM.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/tools4shuls/includes/lib/Authorize/AuthorizeNetCIM.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/tools4shuls/includes/lib/Authorize/AuthorizeNetSOAP.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tools4shuls/t4s_widgets.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Default view of a test Tools4Shuls account.)
The official readme.txt is a good inspiration

tools4shuls/t4s.php 85% from 13 tests

The main PHP script in "Tools4Shuls" version 1.2.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 249 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("tools4shuls.php" instead of "t4s.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected5,955 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP282,6181,1565,049
JavaScript13130854
CSS214452

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.29
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods156
▷ Static methods127.69%
▷ Public methods11976.28%
▷ Protected methods3321.15%
▷ Private methods42.56%
Functions59
▷ Named functions5898.31%
▷ Anonymous functions11.69%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected