84% clearblue-due-date-calculator

Code Review | Clearblue® Due Date Calculator

WordPress plugin Clearblue® Due Date Calculator scored84%from 54 tests.

About plugin

  • Plugin page: clearblue-due-dat...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Sep 8, 2020
  • Latest release: Jul 7, 2022
  • Number of updates: 11
  • Update frequency: every 66.7 days
  • Top authors: giroud (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,709 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼13.47ms] Passed 4 tests

Analyzing server-side resources used by Clearblue® Due Date Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.61 ▼4.45
Dashboard /wp-admin3.37 ▲0.0250.91 ▼12.97
Posts /wp-admin/edit.php3.48 ▲0.1250.56 ▼1.34
Add New Post /wp-admin/post-new.php5.97 ▲0.08102.60 ▼35.13
Media Library /wp-admin/upload.php3.29 ▲0.0641.49 ▲6.78
Due Date Calculator /wp-admin/tools.php?page=clearblue-due-date-calculator3.2733.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 9 new options
New WordPress options
cbddc-version
widget_recent-comments
widget_clearblue-due-date-calculator-widget
db_upgraded
cbddc-show-credits
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Clearblue® Due Date Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲15813.79 ▼0.615.63 ▲3.6141.63 ▼1.51
Dashboard /wp-admin2,219 ▲314.93 ▲0.03101.68 ▼16.1338.86 ▼5.00
Posts /wp-admin/edit.php2,102 ▲102.25 ▲0.2541.00 ▲0.7831.70 ▼5.42
Add New Post /wp-admin/post-new.php1,525 ▲423.01 ▼0.03599.85 ▼97.1851.33 ▼1.29
Media Library /wp-admin/upload.php1,395 ▲74.37 ▲0.1699.08 ▼1.5540.82 ▼6.11
Due Date Calculator /wp-admin/tools.php?page=clearblue-due-date-calculator1,5422.7354.8343.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • cbddc-version
    • can_compress_scripts
    • cbddc-show-credits
    • widget_clearblue-due-date-calculator-widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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 | 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CbDueDateCalculator_Data' not found in wp-content/plugins/clearblue-due-date-calculator/inc/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CbDueDateCalculator_Data' not found in wp-content/plugins/clearblue-due-date-calculator/inc/tool.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

clearblue-due-date-calculator/clearblue-due-date-calculator.php 92% from 13 tests

This is the main PHP file of "Clearblue® Due Date Calculator" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 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,592 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS39732772
PHP8113226442
JavaScript55987237
JSON300129
SVG10112

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1257.14%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected