74% ovulation-calculator

Code Review | Ovulation Calculator

WordPress plugin Ovulation Calculator scored74%from 54 tests.

About plugin

  • Plugin page: ovulation-calculator
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2019
  • Latest release: Mar 3, 2023
  • Number of updates: 23
  • Update frequency: every 62.3 days
  • Top authors: zakirstage (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /5,358 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼12.74ms] Passed 4 tests

Server-side resources used by Ovulation Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0224.38 ▼14.40
Dashboard /wp-admin3.37 ▲0.0744.87 ▼6.79
Posts /wp-admin/edit.php3.49 ▲0.1347.44 ▼2.90
Add New Post /wp-admin/post-new.php5.95 ▲0.0780.37 ▼26.88
Media Library /wp-admin/upload.php3.30 ▲0.0735.81 ▲1.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
ovulationcalculator-group
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ovulation Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.74 ▼0.638.99 ▲7.2539.07 ▼2.28
Dashboard /wp-admin2,233 ▲455.85 ▲0.04104.42 ▼0.2076.59 ▲34.50
Posts /wp-admin/edit.php2,119 ▲302.02 ▲0.0439.25 ▼0.5134.16 ▼1.94
Add New Post /wp-admin/post-new.php1,551 ▲1818.42 ▼4.71707.71 ▲74.8266.09 ▲4.42
Media Library /wp-admin/upload.php1,412 ▲244.22 ▲0.0198.78 ▲3.5175.91 ▲34.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WP_Plugin_Template' not found
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ovulation-calculator/include/admin/emailtranslation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ovulation-calculator/include/admin/calendardays.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ovulation-calculator/include/admin/calendarmonth.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ovulation-calculator/include/admin/translation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ovulation-calculator/include/admin/mailchimp.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ovulation-calculator/include/oc-shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ovulation-calculator/include/admin/color.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: fertility, ovulation, calculator, pregnancy

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

The entry point to "Ovulation Calculator" version 1.0.3 is a PHP file that has certain tags in its header comment area
108 characters long description:
This ovulation calculator will calculate your period, fertility and shows the next 6 months ovulation dates.

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
Success! There were no dangerous files found in this plugin3,770 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS6163782,007
PHP9160521,481
SVG1206182
JavaScript52527100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
include/img/period.png0.66KB0.17KB▼ 74.04%
css/images/circle.png1.01KB0.49KB▼ 51.26%
css/images/ui-icons_ffffff_256x240NEW.png7.48KB4.17KB▼ 44.21%
include/img/right.png1.51KB0.41KB▼ 72.75%