84% dynamic-calculator

Code Review | Dynamic Calculator

WordPress plugin Dynamic Calculator scored84%from 54 tests.

About plugin

  • Plugin page: dynamic-calculator
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: Jul 17, 2020
  • Latest release: Jul 17, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: krishnasuwal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /393 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Dynamic Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.30 ▼4.79
Dashboard /wp-admin3.31 ▼0.0447.85 ▼18.27
Posts /wp-admin/edit.php3.36 ▲0.0050.25 ▼2.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.86 ▼12.41
Media Library /wp-admin/upload.php3.23 ▲0.0036.40 ▲0.33

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dynamic Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.66 ▼0.3341.59 ▼1.19
Dashboard /wp-admin2,198 ▲305.57 ▼0.1288.51 ▼11.8940.37 ▼4.03
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0039.94 ▲2.0834.46 ▼0.75
Add New Post /wp-admin/post-new.php1,526 ▼323.31 ▲0.15694.66 ▲48.5154.58 ▼8.27
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.04106.91 ▼0.1744.71 ▼1.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/dynamic-calculator/dynamic-calculator.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: dynamic, dynamic calculator, calculator

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

The primary PHP file in "Dynamic Calculator" version 1.0.0 is used by WordPress to initiate all plugin functionality
34 characters long description:
Embed calculators on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected26 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP181424
CSS1011
JavaScript1021

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
No PNG files were detected