84% dca-calculator

Code Review | DCA Calculator

WordPress plugin DCA Calculator scored 84% from 54 tests.

About plugin

  • Plugin page: dca-calculator
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 22, 2022
  • Latest release: Jul 25, 2022
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: dcaprofit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.23ms] Passed 4 tests

This is a short check of server-side resources used by DCA Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.22 ▼3.80
Dashboard /wp-admin3.37 ▲0.0644.55 ▲0.92
Posts /wp-admin/edit.php3.42 ▲0.0646.55 ▲2.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.81 ▼8.81
Media Library /wp-admin/upload.php3.29 ▲0.0634.35 ▲4.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for DCA Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14813.99 ▼0.399.06 ▲7.0237.76 ▼7.38
Dashboard /wp-admin2,206 ▲185.79 ▼0.09108.57 ▼10.7436.36 ▼13.78
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0342.86 ▲4.9637.01 ▲6.82
Add New Post /wp-admin/post-new.php1,533 ▲523.41 ▲4.85663.29 ▲22.5157.92 ▲6.13
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.03107.03 ▲6.6947.49 ▲3.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dca-calculator/dca-calculator.php:18

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can take inspiration from this readme.txt

dca-calculator/dca-calculator.php 92% from 13 tests

Analyzing the main PHP file in "DCA Calculator" version 1.0.2
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected699 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16663459
JavaScript1163134
CSS110106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin