88% woo-extra-fee

Code Review | Cart Extra Fee Option Lite

WordPress plugin Cart Extra Fee Option Lite scored 88% from 54 tests.

About plugin

  • Plugin page: woo-extra-fee
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-5.7.1
  • WordPress version: 5.8.1
  • First release: Jun 17, 2016
  • Latest release: Apr 23, 2021
  • Number of updates: 17
  • Update frequency: every 104.2 days
  • Top authors: freewebmentor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,104 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼147.92ms] Passed 4 tests

This is a short check of server-side resources used by Cart Extra Fee Option Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0028.88 ▲5.33
Dashboard /wp-admin3.07 ▲0.0035.95 ▼0.14
Posts /wp-admin/edit.php3.12 ▲0.0130.13 ▼0.35
Add New Post /wp-admin/post-new.php5.43 ▼0.0171.39 ▼591.80
Media Library /wp-admin/upload.php3.01 ▲0.0121.80 ▲0.61
Extra Fee Options /wp-admin/admin.php?page=wc-extra-fee2.9619.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Cart Extra Fee Option Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲9315.49 ▼0.156.86 ▲1.9482.50 ▲6.83
Dashboard /wp-admin2,936 ▲406.09 ▼0.07117.87 ▼13.21167.95 ▼3.98
Posts /wp-admin/edit.php2,740 ▲33.24 ▼0.0066.69 ▲1.47137.33 ▼1.15
Add New Post /wp-admin/post-new.php3,817 ▲1,74519.14 ▼2.99433.42 ▲38.20159.09 ▼16.53
Media Library /wp-admin/upload.php1,749 ▼35.48 ▼0.04146.06 ▲3.02184.78 ▲5.93
Extra Fee Options /wp-admin/admin.php?page=wc-extra-fee1,2002.4254.60121.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wc-extra-fee
    • > Notice in wp-content/plugins/woo-extra-fee/admin/settings.php+68
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-extra-fee/admin/settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === woo-extra-fee === )
You can take inspiration from this readme.txt

woo-extra-fee/wc-extra-fee.php 92% from 13 tests

This is the main PHP file of "Cart Extra Fee Option Lite" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-extra-fee.php" instead of "wc-extra-fee.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected115 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
3 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png257.73KB59.92KB▼ 76.75%
screenshot-2.png19.56KB6.65KB▼ 66.01%
img/woo_16.png0.49KB0.43KB▼ 11.24%