68% thq-connect

Code Review | TidyConnect

WordPress plugin TidyConnect scored68%from 54 tests.

About plugin

  • Plugin page: thq-connect
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2017
  • Latest release: Jun 13, 2019
  • Number of updates: 43
  • Update frequency: every 19.6 days
  • Top authors: mbelstead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /831 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.69MB] [CPU: ▼44.80ms] Passed 4 tests

An overview of server-side resources used by TidyConnect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.1610.65 ▼26.05
Dashboard /wp-admin2.32 ▼0.9814.19 ▼30.30
Posts /wp-admin/edit.php2.32 ▼1.0412.97 ▼38.04
Add New Post /wp-admin/post-new.php2.32 ▼3.5714.19 ▼84.79
Media Library /wp-admin/upload.php2.32 ▼0.9110.94 ▼23.06
TidyConnect /wp-admin/options-general.php?page=tidy-connect-options2.3212.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for TidyConnect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.48 ▼0.111.81 ▲0.1044.88 ▲4.71
Dashboard /wp-admin2,211 ▲195.86 ▲0.88109.37 ▼2.0842.85 ▼0.11
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0035.08 ▼6.1335.30 ▼2.00
Add New Post /wp-admin/post-new.php1,537 ▲323.31 ▲0.19661.79 ▼7.4746.94 ▼1.35
Media Library /wp-admin/upload.php1,386 ▲44.19 ▼0.0495.57 ▼3.2042.68 ▼1.52
TidyConnect /wp-admin/options-general.php?page=tidy-connect-options8892.1821.5728.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/thq-connect/calendar.php+416
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_tidyconnectcalendarwidget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tidy-connect-options
    • > Warning in wp-content/plugins/thq-connect/calendar.php+437
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=tidy-connect-options
    • > Warning in wp-content/plugins/thq-connect/calendar.php+416
    file_get_contents(https://.tidyhq.com/public/schedule/events.ics): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tidy-connect-options
    • > Notice in wp-content/plugins/thq-connect/calendar.php+970
    Undefined offset: 0
    • > GET request to /wp-admin/options-general.php?page=tidy-connect-options
    • > Warning in wp-content/plugins/thq-connect/calendar.php+437
    file_get_contents(https://.tidyhq.com/public/schedule/meetings.ics): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/thq-connect/calendar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/thq-connect/tidy_connect.php:41

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: management, organizations, administration, tidyhq, associations

thq-connect/tidy_connect.php 85% from 13 tests

"TidyConnect" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("thq-connect.php" instead of "tidy_connect.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 598 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,861 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21882371,583
CSS12521278

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity91.75
▷ Minimum class complexity38.00
▷ Maximum class complexity125.00
Average method complexity9.60
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.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
No PNG files were detected