84% menstrual-cycle-calculator

Code Review | Menstrual Cycle Calculator

WordPress plugin Menstrual Cycle Calculator scored84%from 54 tests.

About plugin

  • Plugin page: menstrual-cycle-c...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 30, 2023
  • Latest release: Mar 31, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: iamsirotee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.50ms] Passed 4 tests

This is a short check of server-side resources used by Menstrual Cycle Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.97 ▼4.54
Dashboard /wp-admin3.32 ▲0.0244.22 ▼5.69
Posts /wp-admin/edit.php3.37 ▲0.0146.99 ▲2.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.23 ▼2.11
Media Library /wp-admin/upload.php3.24 ▲0.0137.40 ▲2.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Menstrual Cycle Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.42 ▲0.061.66 ▼0.0842.08 ▼4.31
Dashboard /wp-admin2,198 ▲185.58 ▼0.0091.77 ▼9.4535.96 ▼8.30
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0238.42 ▲2.9637.10 ▲1.54
Add New Post /wp-admin/post-new.php1,526 ▼1123.10 ▲4.94674.82 ▲10.1362.88 ▼5.27
Media Library /wp-admin/upload.php1,400 ▼34.11 ▼0.16115.18 ▲17.7348.36 ▲3.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menstrual-cycle-calculator/menstrual-cycle-calculator.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: pregnancy, calculator, menstrual cycle, fertility, period...

menstrual-cycle-calculator/menstrual-cycle-calculator.php 92% from 13 tests

The primary PHP file in "Menstrual Cycle Calculator" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 215 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin91 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142657
CSS15034

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin