10% clearblue-ovulation-calculator

Code Review | Clearblue® Ovulation Calculator

WordPress plugin Clearblue® Ovulation Calculator scored10%from 54 tests.

About plugin

  • Plugin page: clearblue-ovulati...
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2020
  • Latest release: Jul 1, 2022
  • Number of updates: 18
  • Update frequency: every 36.3 days
  • Top authors: giroud (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,280 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/clearblue-ovulation-calculator/class/plugin.php+28
    Use of undefined constant CBDDC_VERSION - assumed 'CBDDC_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼48.36ms] Passed 4 tests

An overview of server-side resources used by Clearblue® Ovulation Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.438.19 ▼31.20
Dashboard /wp-admin2.05 ▼1.2613.28 ▼35.35
Posts /wp-admin/edit.php2.05 ▼1.3110.52 ▼36.29
Add New Post /wp-admin/post-new.php2.05 ▼3.8412.78 ▼90.58
Media Library /wp-admin/upload.php2.05 ▼1.188.51 ▼23.94
Ovulation Calculator /wp-admin/tools.php?page=clearblue-ovulation-calculator2.0510.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
db_upgraded
cbddc-version
widget_clearblue-ovulation-calculator-widget
theysaidso_admin_options
cbddc-show-credits
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Clearblue® Ovulation Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲16913.88 ▼0.495.85 ▲4.2138.45 ▼16.51
Dashboard /wp-admin2,219 ▲374.97 ▲0.08114.32 ▲10.5741.03 ▼7.10
Posts /wp-admin/edit.php2,105 ▲162.22 ▲0.1739.49 ▼0.2740.96 ▲2.78
Add New Post /wp-admin/post-new.php1,526 ▼223.40 ▲5.07679.13 ▲79.0553.39 ▲2.13
Media Library /wp-admin/upload.php1,404 ▲164.33 ▲0.1298.78 ▼3.8042.52 ▼3.30
Ovulation Calculator /wp-admin/tools.php?page=clearblue-ovulation-calculator1,8182.5968.5147.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/clearblue-ovulation-calculator/class/plugin.php+28
    Use of undefined constant CBDDC_VERSION - assumed 'CBDDC_VERSION' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_clearblue-ovulation-calculator-widget
    • cbddc-version
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • cbddc-show-credits

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=clearblue-ovulation-calculator
    • > Warning in wp-content/plugins/clearblue-ovulation-calculator/class/plugin.php+28
    Use of undefined constant CBDDC_VERSION - assumed 'CBDDC_VERSION' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'CbOvulationCalculator_Data' not found in wp-content/plugins/clearblue-ovulation-calculator/inc/tool.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CbOvulationCalculator_Data' not found in wp-content/plugins/clearblue-ovulation-calculator/inc/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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: Invalid url: ""
You can look at the official readme.txt

clearblue-ovulation-calculator/clearblue-ovulation-calculator.php Passed 13 tests

The main file in "Clearblue® Ovulation Calculator" v. 1.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
117 characters long description:
An ovulation calculator estimates how likely a woman is to release an egg on a particular day in her menstrual cycle.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,646 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS313232960
JSON1500833
PHP8120236477
JavaScript595113364
SVG10112

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.20
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1254.55%
▷ Public methods22100.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
PNG images were not found in this plugin