84% free-shipping-badge

Code Review | Free Shipping Badge

WordPress plugin Free Shipping Badge scored84%from 54 tests.

About plugin

  • Plugin page: free-shipping-badge
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Sep 24, 2023
  • Number of updates: 25
  • Update frequency: every 64.6 days
  • Top authors: desperadohouse (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Free Shipping Badge
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.06 ▼5.57
Dashboard /wp-admin3.33 ▲0.0250.04 ▼5.01
Posts /wp-admin/edit.php3.38 ▲0.0250.69 ▼0.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.65 ▼4.98
Media Library /wp-admin/upload.php3.25 ▲0.0237.51 ▲0.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Free Shipping Badge: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.29 ▼1.131.65 ▲0.0543.10 ▼0.62
Dashboard /wp-admin2,228 ▲435.83 ▲0.92102.96 ▼16.9078.96 ▲35.44
Posts /wp-admin/edit.php2,111 ▲221.99 ▼0.0239.66 ▲2.2136.43 ▲4.49
Add New Post /wp-admin/post-new.php1,530 ▲1623.13 ▲5.74770.27 ▲87.0663.98 ▲12.88
Media Library /wp-admin/upload.php1,410 ▲224.22 ▼0.01104.41 ▼7.5577.60 ▲28.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 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
  • 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/free-shipping-badge/free-shipping-badge.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

free-shipping-badge/free-shipping-badge.php Passed 13 tests

"Free Shipping Badge" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
113 characters long description:
This is plugin to adding "FREE SHIPPING BADGE" to product if price is higher of some "admin declared limit price"

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,663 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,64563,597
PHP2212065
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin