89% gosweetspot-shipping-options

Code Review | GoSweetSpot Shipping Options

WordPress plugin GoSweetSpot Shipping Options scored89%from 54 tests.

About plugin

  • Plugin page: gosweetspot-shipp...
  • Plugin version: 0.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 8
  • Update frequency: every 41.6 days
  • Top authors: hankzanggss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,026 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.54ms] Passed 4 tests

Analyzing server-side resources used by GoSweetSpot Shipping Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.94 ▲4.28
Dashboard /wp-admin3.38 ▲0.0447.03 ▼14.79
Posts /wp-admin/edit.php3.50 ▲0.1449.47 ▼0.70
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.20 ▼6.93
Media Library /wp-admin/upload.php3.31 ▲0.0740.44 ▲6.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GoSweetSpot Shipping Options
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.19 ▼1.195.12 ▲3.4538.46 ▼2.54
Dashboard /wp-admin2,210 ▲255.85 ▼0.03105.60 ▲6.6843.38 ▲1.86
Posts /wp-admin/edit.php2,095 ▲62.04 ▼0.0039.65 ▼2.0639.50 ▲4.13
Add New Post /wp-admin/post-new.php1,537 ▲1723.33 ▲0.36662.00 ▼5.8853.81 ▼2.56
Media Library /wp-admin/upload.php1,389 ▼24.26 ▲0.03102.99 ▲3.0148.58 ▲4.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

gosweetspot-shipping-options/gss-shipping-options.php 77% from 13 tests

This is the main PHP file of "GoSweetSpot Shipping Options" version 0.1.5, 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:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gosweetspot-shipping-options.php" instead of "gss-shipping-options.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin455 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12134138455

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity13.20
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods1368.42%
▷ Protected methods315.79%
▷ Private methods315.79%
Functions10
▷ Named functions550.00%
▷ Anonymous functions550.00%
Constants11
▷ Global constants11100.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 files were detected