83% roughest-instant-estimate-calculator

Code Review | Instant Estimate Calculator

WordPress plugin Instant Estimate Calculator scored83%from 54 tests.

About plugin

  • Plugin page: roughest-instant-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2020
  • Latest release: Mar 21, 2023
  • Number of updates: 29
  • Update frequency: every 31.0 days
  • Top authors: connorontheweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Instant Estimate Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.17 ▼1.35
Dashboard /wp-admin3.32 ▲0.0248.79 ▼7.44
Posts /wp-admin/edit.php3.37 ▲0.0248.88 ▼4.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.71 ▼16.24
Media Library /wp-admin/upload.php3.24 ▲0.0236.09 ▼1.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_roughest_widget_sqft
db_upgraded
widget_recent-comments
widget_roughest_widget_run
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Instant Estimate Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.22 ▼1.252.98 ▲0.6939.35 ▼3.25
Dashboard /wp-admin2,206 ▲154.88 ▼0.03105.38 ▼3.6838.97 ▼3.25
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0539.20 ▼2.1634.14 ▼2.72
Add New Post /wp-admin/post-new.php1,542 ▲918.51 ▼4.70626.21 ▼68.4949.36 ▼10.43
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.07101.68 ▼4.4346.16 ▲1.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_roughest_widget_run
    • widget_recent-comments
    • widget_roughest_widget_sqft
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× 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/roughest-instant-estimate-calculator/includes/roughest-scripts.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/roughest-instant-estimate-calculator/includes/roughest-class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === roughest-instant-estimate-calculator === )
The official readme.txt might help

roughest-instant-estimate-calculator/roughest.php 77% from 13 tests

The main file in "Instant Estimate Calculator" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("roughest-instant-estimate-calculator.php" instead of "roughest.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)
  • 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 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin622 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP313683480
JavaScript14040127
CSS12115

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity39.00
▷ Minimum class complexity38.00
▷ Maximum class complexity40.00
Average method complexity10.50
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin