10% book-doctor-appointments-icliniq

Code Review | Book Doctor Appointments - iCliniq

WordPress plugin Book Doctor Appointments - iCliniqscored 10% from 54 tests.

About plugin

  • Plugin page: book-doctor-appoi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jun 24, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: marshal@icliniq.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,754 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/book-doctor-appointments-icliniq/widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; ICQ_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.62ms] Passed 4 tests

Server-side resources used by Book Doctor Appointments - iCliniq
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.396.07 ▼37.42
Dashboard /wp-admin2.09 ▼1.215.70 ▼46.62
Posts /wp-admin/edit.php2.09 ▼1.266.36 ▼43.44
Add New Post /wp-admin/post-new.php2.09 ▼3.796.21 ▼95.00
Media Library /wp-admin/upload.php2.09 ▼1.146.20 ▼30.03
Configure Doctor Appointment Widget - iCliniq /wp-admin/options-general.php?page=book-doctor-appointments-icliniq2.095.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
widget_icq-widget
widget_recent-posts
widget_theysaidso_widget
icq_speciality_id_json
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
icq_location

Browser metrics Passed 4 tests

An overview of browser requirements for Book Doctor Appointments - iCliniq
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼1.131.73 ▼0.1837.19 ▼7.49
Dashboard /wp-admin2,210 ▲224.84 ▼0.26106.03 ▲1.3342.84 ▼3.42
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0139.69 ▲1.3035.96 ▲2.30
Add New Post /wp-admin/post-new.php1,523 ▼1123.24 ▲0.19648.27 ▼33.8354.50 ▲2.51
Media Library /wp-admin/upload.php1,392 ▲104.23 ▼0.02102.34 ▼1.2643.81 ▼4.42
Configure Doctor Appointment Widget - iCliniq /wp-admin/options-general.php?page=book-doctor-appointments-icliniq1,1272.0223.5544.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/book-doctor-appointments-icliniq/widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; ICQ_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • db_upgraded
    • icq_location
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • icq_speciality_id_json
    • widget_icq-widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=book-doctor-appointments-icliniq
    • > Deprecated in wp-content/plugins/book-doctor-appointments-icliniq/widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; ICQ_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=book-doctor-appointments-icliniq
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ICQ_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=book-doctor-appointments-icliniq
    • > Notice in wp-content/plugins/book-doctor-appointments-icliniq/admin-page.php+17
    Undefined index: icq_speciality_id_json
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=book-doctor-appointments-icliniq
    • > Warning in wp-content/plugins/book-doctor-appointments-icliniq/admin-page.php+61
    array_search() expects parameter 2 to be array, null given

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
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/book-doctor-appointments-icliniq/config.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/book-doctor-appointments-icliniq/config.php:8
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/book-doctor-appointments-icliniq/config.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/book-doctor-appointments-icliniq/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/book-doctor-appointments-icliniq/config.php:8
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/book-doctor-appointments-icliniq/config.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/book-doctor-appointments-icliniq/options.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/book-doctor-appointments-icliniq/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/book-doctor-appointments-icliniq/config.php:8
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/book-doctor-appointments-icliniq/config.php on line 8

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 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Doctot listing displayed as a sidebar widget) image required
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Book Doctor Appointments - iCliniq=== )
The official readme.txt might help

book-doctor-appointments-icliniq/book-doctor-appointments-icliniq.php 92% from 13 tests

The main PHP file in "Book Doctor Appointments - iCliniq" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 303 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin382 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8107122382

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity7.00
▷ Maximum class complexity15.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.30MB with 0.16MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png306.22KB143.93KB▼ 53.00%