84% button-for-doctolib

Code Review | Button for Doctolib

WordPress plugin Button for Doctolib scored84%from 54 tests.

About plugin

  • Plugin page: button-for-doctolib
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 6.3.1
  • First release: Apr 12, 2020
  • Latest release: Apr 12, 2020
  • Number of updates: 17
  • Update frequency: every 0.7 days
  • Top authors: clemart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,149 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.45ms] Passed 4 tests

Server-side resources used by Button for Doctolib
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0150.65 ▲8.84
Dashboard /wp-admin3.32 ▲0.0250.76 ▼4.25
Posts /wp-admin/edit.php3.37 ▲0.0246.65 ▼10.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.39 ▼10.62
Media Library /wp-admin/upload.php3.24 ▲0.0237.67 ▲3.83
Doctolib Settings /wp-admin/options-general.php?page=doctolib-btn-settings3.2132.83

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Button for Doctolib: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.17 ▼0.121.81 ▼0.5145.16 ▲2.66
Dashboard /wp-admin2,199 ▲225.62 ▲0.08101.03 ▲0.3244.76 ▼1.34
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0036.35 ▼0.6435.56 ▲1.41
Add New Post /wp-admin/post-new.php1,529 ▼823.55 ▲5.43651.60 ▲6.2060.40 ▼4.24
Media Library /wp-admin/upload.php1,398 ▼24.20 ▼0.0198.78 ▲0.5646.30 ▲3.26
Doctolib Settings /wp-admin/options-general.php?page=doctolib-btn-settings8542.0126.6627.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/button-for-doctolib/doctolib-btn.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: doctolib

button-for-doctolib/doctolib-btn.php 85% from 13 tests

The main PHP script in "Button for Doctolib" version 0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("button-for-doctolib.php" instead of "doctolib-btn.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected264 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File1141444

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
doctolib.png78.56KB30.92KB▼ 60.65%