84% feesable-fee-calculator

Code Review | Feesable Fee Calculator

WordPress plugin Feesable Fee Calculator scored84%from 54 tests.

About plugin

  • Plugin page: feesable-fee-calc...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 30, 2022
  • Latest release: Jul 27, 2023
  • Number of updates: 15
  • Update frequency: every 28.3 days
  • Top authors: markparnell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.65ms] Passed 4 tests

Analyzing server-side resources used by Feesable Fee Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.40 ▼3.98
Dashboard /wp-admin3.35 ▲0.0544.77 ▼1.57
Posts /wp-admin/edit.php3.40 ▲0.0548.56 ▲2.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.54 ▼6.70
Media Library /wp-admin/upload.php3.27 ▲0.0534.62 ▲1.67
Feesable /wp-admin/options-general.php?page=feesable-fee-calculator-settings3.2532.95

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

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

Browser metrics Passed 4 tests

Feesable Fee Calculator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6715.45 ▲0.871.73 ▲0.1041.54 ▼6.27
Dashboard /wp-admin2,219 ▲316.18 ▲0.27141.29 ▲32.5343.38 ▼1.04
Posts /wp-admin/edit.php2,104 ▲153.41 ▲1.3887.15 ▲46.9537.09 ▲1.91
Add New Post /wp-admin/post-new.php1,538 ▲524.29 ▲1.14662.53 ▲10.5663.04 ▲0.23
Media Library /wp-admin/upload.php1,401 ▲105.14 ▲0.94130.33 ▲33.2043.34 ▲1.52
Feesable /wp-admin/options-general.php?page=feesable-fee-calculator-settings9673.2273.1736.94

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/feesable-fee-calculator/public/partials/feesable-fee-calculator-public-display.php
    • > /wp-content/plugins/feesable-fee-calculator/admin/partials/feesable-fee-calculator-admin-display.php

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === feesable-fee-calculator === )
Please take inspiration from this readme.txt

feesable-fee-calculator/feesable-fee-calculator.php Passed 13 tests

"Feesable Fee Calculator" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
48 characters long description:
Display the Feesable Fee Calculator on your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin364 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1189430357
JavaScript22277
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods416.67%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin