63% child-support-calculator

Code Review | Child Support Calculator

WordPress plugin Child Support Calculator scored63%from 54 tests.

About plugin

  • Plugin page: child-support-cal...
  • Plugin version: 2.0.1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2022
  • Latest release: Sep 4, 2023
  • Number of updates: 52
  • Update frequency: every 10.7 days
  • Top authors: knshukla (50%)tjomak (23.08%)ak.singla (19.23%)amityadav1 (13.46%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,177 total downloads

Benchmarks

Plugin footprint 47% 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: ▲5.84MB] [CPU: ▲26.84ms] 75% from 4 tests

A check of server-side resources used by Child Support Calculator
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.84MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.38 ▲5.9270.99 ▲27.94
Dashboard /wp-admin9.40 ▲6.0682.45 ▲19.26
Posts /wp-admin/edit.php9.40 ▲6.0591.55 ▲37.12
Add New Post /wp-admin/post-new.php11.22 ▲5.33128.24 ▲23.35
Media Library /wp-admin/upload.php9.40 ▲6.1776.88 ▲36.81
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.4066.59

Server storage [IO: ▲14.11MB] [DB: ▲0.03MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 487 new files
Database: 4 new tables, 19 new options
New tables
wp_wpcsc_incomes
wp_wpcsc_leads
wp_wpcsc_incomes_nc
wp_wpcsc_calculations
New WordPress options
wpcsc__admin_email
widget_theysaidso_widget
can_compress_scripts
fs_gdpr
theysaidso_admin_options
wpcsc__pdf
wpcsc_install_date
wpcsc_db_version
widget_recent-comments
fs_active_plugins
...

Browser metrics Passed 4 tests

Checking browser requirements for Child Support Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17413.45 ▼1.119.82 ▲8.2628.70 ▼14.69
Dashboard /wp-admin2,224 ▲545.63 ▲0.0290.54 ▼10.9042.16 ▼5.33
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0039.78 ▲2.9237.35 ▼3.49
Add New Post /wp-admin/post-new.php1,556 ▲3024.26 ▲1.26637.30 ▼7.4070.36 ▲12.03
Media Library /wp-admin/upload.php1,438 ▲354.22 ▼0.0197.14 ▼10.8741.62 ▼6.84
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0871.6624.4827.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/child-support-calculator/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_wpcsc_calculations
    • wp_wpcsc_leads
    • wp_wpcsc_incomes
    • wp_wpcsc_incomes_nc
  • This plugin does not fully uninstall, leaving 19 options in the database
    • wpcsc__admin_email
    • wpcsc_delete_data
    • fs_active_plugins
    • wpcsc_db_version
    • fs_gdpr
    • wpcsc__form-nc
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • ...

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 136× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/child-support-calculator/includes/dompdf/src/FrameDecorator/NullFrameDecorator.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/child-support-calculator/includes/dompdf/src/FrameDecorator/TableRow.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/child-support-calculator/includes/dompdf/src/FrameReflower/Image.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/child-support-calculator/includes/dompdf/lib/php-font-lib/src/FontLib/Table/Type/hmtx.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/child-support-calculator/includes/dompdf/lib/php-svg-lib/src/Svg/Tag/Ellipse.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/child-support-calculator/includes/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/child-support-calculator/includes/functions-database.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/child-support-calculator/includes/dompdf/lib/php-font-lib/src/FontLib/Table/Type/kern.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/child-support-calculator/includes/dompdf/src/Positioner/Block.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/child-support-calculator/includes/dompdf/lib/php-css-parser/src/Comment/Comment.php:8

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

child-support-calculator/child-support-calculator.php 92% from 13 tests

Analyzing the main PHP file in "Child Support Calculator" version 2.0.1.2
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 195 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin84,257 lines of code in 373 files:
LanguageFilesBlank linesComment linesLines of code
PHP32417,37335,35080,435
JavaScript132311671,590
Markdown72620969
CSS2017376910
JSON500207
XML10286
YAML19035
HTML10017
SVG1008

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,089)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity48.40
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces31
Interfaces5
Traits6
Classes231
▷ Abstract classes146.06%
▷ Concrete classes21793.94%
▷ Final classes00.00%
Methods3,381
▷ Static methods3339.85%
▷ Public methods2,67979.24%
▷ Protected methods2627.75%
▷ Private methods44013.01%
Functions200
▷ Named functions17989.50%
▷ Anonymous functions2110.50%
Constants365
▷ Global constants10428.49%
▷ Class constants26171.51%
▷ Public constants261100.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
6 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/logo.png27.15KB7.79KB▼ 71.30%
includes/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/icon.png40.04KB14.05KB▼ 64.92%