78% simple-clinic

Code Review | Simple Clinic

WordPress plugin Simple Clinic scored78%from 54 tests.

About plugin

  • Plugin page: simple-clinic
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2020
  • Latest release: Mar 23, 2023
  • Number of updates: 17
  • Update frequency: every 57.4 days
  • Top authors: PIXELovely (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.08ms] Passed 4 tests

Server-side resources used by Simple Clinic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.88 ▲0.39
Dashboard /wp-admin3.54 ▲0.2048.13 ▼13.13
Posts /wp-admin/edit.php3.65 ▲0.3047.12 ▲1.46
Add New Post /wp-admin/post-new.php6.13 ▲0.2481.15 ▼17.04
Media Library /wp-admin/upload.php3.46 ▲0.2437.44 ▲2.10
Simple Clinic Settings /wp-admin/options-general.php?page=simpleclinic_settings3.4034.54
Add New /wp-admin/post-new.php?post_type=sc_provider3.3834.71
Specialties /wp-admin/edit-tags.php?taxonomy=sc_specialty&post_type=sc_provider3.4634.77
All Providers /wp-admin/edit.php?post_type=sc_provider3.5136.39

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Clinic
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.24 ▼1.134.40 ▲2.5143.41 ▼1.25
Dashboard /wp-admin2,241 ▲594.88 ▲0.01101.64 ▼17.3440.45 ▼3.24
Posts /wp-admin/edit.php2,127 ▲382.06 ▲0.0439.56 ▲4.3635.78 ▼2.14
Add New Post /wp-admin/post-new.php6,379 ▲4,83727.84 ▲9.29883.98 ▲256.4958.50 ▲10.07
Media Library /wp-admin/upload.php1,414 ▲264.20 ▲0.0398.06 ▲0.7843.33 ▼0.07
Simple Clinic Settings /wp-admin/options-general.php?page=simpleclinic_settings9812.0624.1243.83
Add New /wp-admin/post-new.php?post_type=sc_provider2,3787.62171.6883.15
Specialties /wp-admin/edit-tags.php?taxonomy=sc_specialty&post_type=sc_provider1,2932.1426.0329.34
All Providers /wp-admin/edit.php?post_type=sc_provider1,1052.0032.6428.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simpleclinic_settings
    • > Notice in wp-content/plugins/simple-clinic/settings.php+134
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/post-new.php?post_type=sc_provider
    • > Notice in wp-content/plugins/simple-clinic/simpleclinic.php+283
    Undefined index: pagemeta_noncename

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 items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-clinic/avada/fusionbuilder.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-clinic/simpleclinic.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-clinic/gutenberg/gutenberg.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-clinic/settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: medical, fusion builder, modalities, practitioners, modality...

simple-clinic/simpleclinic.php 85% from 13 tests

The principal PHP file in "Simple Clinic" v. 1.0.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-clinic.php" instead of "simpleclinic.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,263 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42551131,109
JavaScript110399
CSS112055

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin