83% lamoud-pregnancy-calculator

Code Review | lamoud-Pregnancy-Calculator

WordPress plugin lamoud-Pregnancy-Calculator scored83%from 54 tests.

About plugin

  • Plugin page: lamoud-pregnancy-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2021
  • Latest release: Sep 19, 2023
  • Number of updates: 10
  • Update frequency: every 71.3 days
  • Top authors: ingmoudy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /957 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by lamoud-Pregnancy-Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.13 ▲5.27
Dashboard /wp-admin3.31 ▼0.04100.01 ▲36.47
Posts /wp-admin/edit.php3.36 ▲0.0050.46 ▼2.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.94 ▼9.63
Media Library /wp-admin/upload.php3.23 ▲0.0032.98 ▼5.53

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for lamoud-Pregnancy-Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.45 ▲0.072.42 ▲0.5854.88 ▲11.16
Dashboard /wp-admin2,206 ▲155.83 ▼0.08116.77 ▼1.1842.45 ▼0.43
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0152.82 ▲11.6738.84 ▼1.25
Add New Post /wp-admin/post-new.php1,536 ▲823.43 ▲0.42647.37 ▼27.2249.45 ▼6.45
Media Library /wp-admin/upload.php1,388 ▼04.30 ▼0.10104.60 ▼14.6145.61 ▼11.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_reset_query() in wp-content/plugins/lamoud-pregnancy-calculator/lamoud-Pregnancy-Calculator.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lamoud-pregnancy-calculator/includes/lamoud_pergnancy_content.php:33
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/lamoud-pregnancy-calculator/includes/lamoud_pergnancy_content.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lamoud-pregnancy-calculator/includes/calc_form.php:58
    • > PHP Notice
      Undefined variable: year in wp-content/plugins/lamoud-pregnancy-calculator/includes/lamoud_pergnancy_content.php on line 3
    • > PHP Notice
      Undefined variable: day in wp-content/plugins/lamoud-pregnancy-calculator/includes/lamoud_pergnancy_content.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in lamoud-pregnancy-calculator/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === lamoud-pregnancy-calculator === )
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

lamoud-pregnancy-calculator/lamoud-Pregnancy-Calculator.php 85% from 13 tests

"lamoud-Pregnancy-Calculator" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("lamoud-pregnancy-calculator.php" instead of "lamoud-Pregnancy-Calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin717 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2212280
PHP46821267
PO File15256134
JavaScript18033
Markdown1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin