72% doctor-agenda

Code Review | Doctor Agenda

WordPress plugin Doctor Agenda scored 72% from 54 tests.

About plugin

  • Plugin page: doctor-agenda
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-5.8
  • WordPress version: 5.8.1
  • First release: Aug 3, 2021
  • Latest release: Aug 4, 2021
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: mikeldocfav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▲79.92ms] Passed 4 tests

A check of server-side resources used by Doctor Agenda
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0837.34 ▼2.97
Dashboard /wp-admin3.21 ▲0.15378.77 ▲326.39
Posts /wp-admin/edit.php3.26 ▲0.16339.36 ▲287.80
Add New Post /wp-admin/post-new.php5.50 ▲0.07391.31 ▼274.99
Media Library /wp-admin/upload.php3.09 ▲0.09346.27 ▲309.82
Doctor Agenda /wp-admin/options-general.php?page=wp-doctorAgenda3.07303.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Doctor Agenda
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,840 ▲24416.19 ▲0.6014.36 ▲6.7452.76 ▲4.86
Dashboard /wp-admin2,994 ▲605.87 ▼0.07137.21 ▼14.89123.04 ▲5.10
Posts /wp-admin/edit.php2,752 ▲132.71 ▲0.0275.97 ▲1.6495.12 ▲1.72
Add New Post /wp-admin/post-new.php1,635 ▲4421.44 ▲2.77263.82 ▼126.65110.90 ▲0.31
Media Library /wp-admin/upload.php1,763 ▼445.00 ▼0.02160.76 ▲2.88124.43 ▼1.12
Doctor Agenda /wp-admin/options-general.php?page=wp-doctorAgenda1,1182.0960.3077.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_wp_doctorAgenda' not found or invalid function name

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/doctor-agenda/public/partials/wp-doctor-agenda-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_load_alloptions() in wp-content/plugins/doctor-agenda/admin/partials/wp-doctor-agenda-admin-display.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-doctorAgenda
    • > Network (severe)
    wp-content/plugins/doctor-agenda/admin/js/wp-doctorAgenda-admin.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-doctorAgenda
    • > Network (severe)
    wp-content/plugins/doctor-agenda/admin/css/wp-doctorAgenda-admin.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

doctor-agenda/wp-doctorAgenda.php 85% from 13 tests

The main file in "Doctor Agenda" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("doctor-agenda.php" instead of "wp-doctorAgenda.php")

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
No dangerous file extensions were detected511 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12165566505
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/assets/default/img/logo.png5.89KB2.88KB▼ 51.06%
assets/banner-772x2502.png141.06KB99.39KB▼ 29.54%
assets/icon-256x256.png16.59KB7.55KB▼ 54.49%
assets/icon-128x128.png7.36KB4.05KB▼ 44.98%